Re: pg ANY/SOME ambiguity wrt sql standard?

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pg ANY/SOME ambiguity wrt sql standard?
Дата
Msg-id Pine.LNX.4.58.0404281535210.28436@sablons.cri.ensmp.fr
обсуждение исходный текст
Ответ на pg ANY/SOME ambiguity wrt sql standard?  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
> 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.

Well, it is not that fine, because allowing ANY and SOME as function name
generates a lot of conflicts, obviously.

The reverse (let us recognize an array expression in an function call
wouldn't work either, as the parser need the special handling of ANY/SOME
in order to look for subselects.

> 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?

So my question is "Any idea?" instead of "Any better idea?" :-(


-- 
Fabien Coelho - coelho@cri.ensmp.fr


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tim Larson
Дата:
Сообщение: Re: OLAP versus Materialized Views?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Usability, MySQL, Postgresql.org, gborg, contrib,