Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> But to make it really nice you'd have to move away from pl programs as
>> strings. That would be a lot more work, and you really wouldn't want to
>> make it work with more than one PL for the sake of everyone's sanity.
You mean something like:
postgres=# begin ...
end;
?
> That would be an awful lot of messiness to save four keystrokes...
I second that. We support that in EDB for Oracle compatibility, and it's
a pain the ass. You need to call the PL/pgSQL parser on the query string
just to figure out where it ends. And worse, psql needs to know about it
too, so you need a minimal version of the PL/pgSQL parser in the client too.
Something like
DO $$ begin ...; end $$;
gives 90% of the usability with 10% of the trouble.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com