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

pg ANY/SOME ambiguity wrt sql standard?

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg ANY/SOME ambiguity wrt sql standard?
Date: 2004-04-28 13:21:00
Message-ID: Pine.LNX.4.58.0404281456470.28436@sablons.cri.ensmp.fr (view raw or flat)
Thread:
Lists: pgsql-hackers
I'm looking into adding sql standard aggregates EVERY/ANY/SOME.
It seems to me that there is a syntax ambiguity with ANY and SOME:

	CREATE TABLE bla(b BOOL);
	SELECT TRUE = ANY(b) FROM bla;

Is parsed as an array-operator and there is a semantical error because no
array is provided. Now ANY could be an aggregate function call, and it
should be fine.

However I really cannot see (my usual lack of imagination) how to handle
this from the parser.

Thus I'm afraid that I'll have to rewrite the A_Expr structure into a
FuncCall to 'any' or 'some' somewhere.

Comments? Any better idea?

-- 
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

Responses

pgsql-hackers by date

Next:From: Andrew HammondDate: 2004-04-28 13:28:08
Subject: Re: Is there any method to keep table in memory at startup
Previous:From: Tom LaneDate: 2004-04-28 13:09:01
Subject: Re: Nasty security bug with clustering

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