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>
Subject: Re: Proposal: plpgsql - "for in array" statement
Date: 2010-09-29 01:31:11
Message-ID: 4CA296DF.5070105@darrenduncan.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera wrote:
> What about
> 
> FOR EACH var IN array_expr LOOP ...
> 
> I think this requires reserving EACH, which could cause a regression for
> working code.  Maybe there's a way to make it work?

Code that quotes all of its identifiers, such as with:

   FOR EACH "var" IN "array_expr" LOOP ...

... would also gain a significant amount of future-proofing since then the 
language can add keywords at will, without there being conflicts with 
user-defined identifiers.

Similarly, quoting identifiers also carries present-day advantages as then one 
can name identifiers whatever is most suitably descriptive for them without 
worrying whether the language has a pre-defined meaning for the used words.

The quoting also has the nice bonus of making them case-sensitive.

-- Darren Duncan

In response to

Responses

pgsql-hackers by date

Next:From: Itagaki TakahiroDate: 2010-09-29 01:33:21
Subject: Re: [RRR] [HACKERS] Commitfest: The Good, The Bad, and the Ugly
Previous:From: Robert HaasDate: 2010-09-29 01:27:43
Subject: Re: Path question

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