2011/2/16 Tom Lane <t...@sss.pgh.pa.us>:
> Andrew Dunstan <and...@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
>

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to