Re: updated patch for foreach stmt

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: updated patch for foreach stmt
Дата
Msg-id AANLkTi=bNG9wb35oPzkmA1zP_KOjGRYQ7p-NKoRJz-GE@mail.gmail.com
обсуждение исходный текст
Ответ на Re: updated patch for foreach stmt  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
2011/2/16 Tom Lane <tgl@sss.pgh.pa.us>:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> On 02/15/2011 08:59 PM, Robert Haas wrote:
>>> Anyhoo, forcing the explicit ARRAY keyword in there seems like pretty
>>> cheap future-proofing to me.  YMMV.
>
>> If this is the syntax that makes you do things like:
>>      FOREACH foo IN ARRAY ARRAY[1,2,3]
>> I have to say I find that pretty darn ugly still.
>
> Yeah, that was the argument against requiring ARRAY.  So it comes down
> to whether you think we need future-proofing here.  I can't immediately
> see any reason for us to need a keyword right there, but ...

the combination of two keywords isn't nice, but we can ensure so
result of expression will has a requested type. It's more verbose,
it's more secure. We can to check a allowed keywords like SCALING in
compile time, we can use a more keywords - A hash type can need a
separation between KEY and VALUE - so any keyword there enables a
higher possibilities in future. We can do it without a auxiliary
keyword too, but parser will be more complex.

Regards

Pavel Stehule

>
>                        regards, tom lane
>


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: updated patch for foreach stmt
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Change pg_last_xlog_receive_location not to move backwards