Skip site navigation (1) Skip section navigation (2)

Re: Proposal: plpgsql - "for in array" statement

From: Darren Duncan <darren(at)darrenduncan(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Proposal: plpgsql - "for in array" statement
Date: 2010-09-29 05:20:38
Message-ID: 4CA2CCA6.8010201@darrenduncan.net (view raw or flat)
Thread:
Lists: 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

In response to

pgsql-hackers by date

Next:From: Itagaki TakahiroDate: 2010-09-29 05:25:38
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch
Previous:From: Itagaki TakahiroDate: 2010-09-29 05:12:59
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group