Re: Proposal: plpgsql - "for in array" statement - Mailing list pgsql-hackers

From Darren Duncan
Subject Re: Proposal: plpgsql - "for in array" statement
Date
Msg-id 4CA2CCA6.8010201@darrenduncan.net
Whole thread Raw
In response to Re: Proposal: plpgsql - "for in array" statement  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan wrote:
> On 09/28/2010 09:31 PM, Darren Duncan wrote:
>>
>> Code that quotes all of its identifiers, such as with:
>>
>>   FOR EACH "var" IN "array_expr" LOOP ...
> 
> This doesn't help in the least if the array is an expression rather than 
> simply a variable - we're not going to start quoting expressions.

I wrote that wrong.  I should have said "array_var" not "array_expr".  I am 
certainly not advocating quoting expressions, and didn't mean to imply that 
here.  My point was that if a token is always interpreted as a keyword rather 
than an identifier when there is ambiguity, then quoting would let users name an 
identifier "each" or "EACH".  In any event, I will not push this since it 
doesn't address the real issue of language changes not breaking the general case 
of legacy code; it only says how users can insulate themselves. -- Darren Duncan


pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch
Next
From: Itagaki Takahiro
Date:
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch