Skip site navigation (1) Skip section navigation (2)

Re: GRANT ON ALL IN schema

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <pjmodos(at)pjmodos(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: GRANT ON ALL IN schema
Date: 2009-08-10 15:19:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Kevin Grittner wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> wrote: 
>> This would become much simpler if you could just execute plpgsql
>> code instead of having to define a function around it.
> I have often wished for that feature.

You're not Robinson Crusoe.

It could be done in several ways.

One fairly simple way would use a new SQL verb (say, DO) like this:

DO $$ something in plfoo$ $ LANGUAGE plfoo;

We could even default the langauge to plpgsql, for which you would then 
just need:

DO $$ something in plpgsql $$;

The something would in effect be treated as a throwaway function taking 
no parameters and returning void.

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.



In response to


pgsql-hackers by date

Next:From: Brendan JurdDate: 2009-08-10 15:19:55
Subject: Re: WIP: to_char, support for EEEE format
Previous:From: Dave PageDate: 2009-08-10 15:17:32
Subject: Re: [PATCH] "could not reattach to shared memory" on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group