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)
Список
Дерево обсуждения
updated patch for foreach stmt Pavel Stehule <pavel.stehule@gmail.com>
Re: updated patch for foreach stmt Stephen Frost <sfrost@snowman.net>
Re: updated patch for foreach stmt Robert Haas <robertmhaas@gmail.com>
Re: updated patch for foreach stmt Stephen Frost <sfrost@snowman.net>
Re: updated patch for foreach stmt Pavel Stehule <pavel.stehule@gmail.com>
Re: updated patch for foreach stmt Stephen Frost <sfrost@snowman.net>
Re: updated patch for foreach stmt Tom Lane <tgl@sss.pgh.pa.us>
Re: updated patch for foreach stmt Robert Haas <robertmhaas@gmail.com>
Re: updated patch for foreach stmt Stephen Frost <sfrost@snowman.net>
Re: updated patch for foreach stmt Andrew Dunstan <andrew@dunslane.net>
Re: updated patch for foreach stmt Tom Lane <tgl@sss.pgh.pa.us>
Re: updated patch for foreach stmt Pavel Stehule <pavel.stehule@gmail.com>
Re: updated patch for foreach stmt Pavel Stehule <pavel.stehule@gmail.com>
Re: updated patch for foreach stmt Stephen Frost <sfrost@snowman.net>
Re: updated patch for foreach stmt Tom Lane <tgl@sss.pgh.pa.us>
2011/2/16 Tom Lane : > Andrew Dunstan 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 по дате отправления
От: Fujii Masao
Дата: