From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org, Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Petr Jelinek <pjmodos@pjmodos.net>
Cc: Stephen Frost <sfrost@snowman.net>
Subject: Re: GRANT ON ALL IN schema
Date: Tue, 11 Aug 2009 00:00:28 +0300
Message-ID: <4A808A6C.9060602@enterprisedb.com> (raw)
In-Reply-To: <3285.1249918596@sss.pgh.pa.us>
References: <4A37BF63.50008@pjmodos.net>
<603c8f070908050951s3e5df452se4c610f01b80bb7d@mail.gmail.com>
<21246.1249491592@sss.pgh.pa.us>
<200908101042.35024.peter_e@gmx.net>
<4A7FE7F902000025000296E3@gw.wicourts.gov>
<4A803A89.9020509@dunslane.net>
<3285.1249918596@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, Kevin.Grittner@wicourts.gov, peter_e@gmx.net, nikhil.sontakke@enterprisedb.com, robertmhaas@gmail.com, pjmodos@pjmodos.net, sfrost@snowman.net
Subject: Re: GRANT ON ALL IN schema
In-Reply-To: <4A808A6C.9060602@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox