Re: GRANT ON ALL IN schema

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: GRANT ON ALL IN schema
Дата
Msg-id 4A803A89.9020509@dunslane.net
обсуждение исходный текст
Ответ на Re: GRANT ON ALL IN schema  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: GRANT ON ALL IN schema  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: GRANT ON ALL IN schema  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-hackers

Kevin Grittner wrote:
> Peter Eisentraut <peter_e@gmx.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.

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Re: WIP: to_char, support for EEEE format
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCH] "could not reattach to shared memory" on Windows