ako a day ago

Yes, exactly, sql do is the Postgres way of executing an anonymous block.