Re: proof concept: do statement parametrization

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proof concept: do statement parametrization
Дата
Msg-id AANLkTikw8x4sfwQsWOdo6N3HslLiY6SCLawFu3DwsVfs@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proof concept: do statement parametrization  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2010/7/4 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> my syntax is reflecting fact, so these are not true parameters - it's
>> +/- similar to default values of function parameters.
>
> FWIW, that doesn't seem like a positive to me.
>
>> You cannot to
>> write do (a int := $1) $$ ... $$ - because utils statements hasn't
>> have variables.
>
> Yet.  I don't particularly want to relax that either, but the syntax of
> this feature shouldn't assume it'll be true forever.
>
> I think it's better to not confuse these things with default parameters,
> so Florian's idea looks better to me.

Maybe I am didn't  explain well my idea. The most all is modificated
named notation enhanced about type info. It isn't default parameter
definition - so I use ":=" and not use "=". And it has same advantage
like named notation has. Using a keyword "USING" isn't perfectly clean
for me - I have a problem with position of parameters - but if other
people feel it different, I'll not have a problem.

do(a int := 20, b int := 20) $$ ... $$;
do (a int, b int) $$ .... $$ USING 10,20;

generally both syntaxes are used now.

This patch is just concept - I spoke it, I would to show attractive
behave, and Florian showed possible  wery nice colaboration shell with
psql. I don't want to insult somebody.

Regards
Pavel Stehule



>
> BTW, we intentionally didn't put any provision for parameters into DO
> originally.  What's changed to alter that decision?
>
>                        regards, tom lane
>


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proof concept: do statement parametrization
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: proof concept: do statement parametrization