subquery syntax broken - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject subquery syntax broken
Date
Msg-id 34D5A5C9.89143680@sable.krasnoyarsk.su
Whole thread Raw
Responses Re: [HACKERS] subquery syntax broken  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Hi!

vac=> create table x (y int, z int);
CREATE
vac=> insert into x values (1,1);
INSERT 18168 1
vac=> insert into x values (1,2);
INSERT 18169 1
vac=> insert into x values (2,1);
INSERT 18170 1
vac=> insert into x values (2,2);
INSERT 18171 1
vac=> select * from x where y = (select max(y) from x);
ERROR:  parser: parse error at or near "select"
vac=> select * from x where y <> (select max(y) from x);
ERROR:  parser: parse error at or near "select"
vac=> select * from x where y < (select max(y) from x);
ERROR:  parser: parse error at or near "select"
vac=> select * from x where (y,z) = (select max(y), max(z) from x);
ERROR:  parser: parse error at or near "="
vac=> select * from x where (y,z) = ANY (select min(y), max(z) from x);
ERROR:  parser: parse error at or near "="
vac=> select * from x where (y,z) <> (select max(y), max(z) from x);
y|z
-+-
1|1
1|2
2|1
(3 rows)

Tom, Bruce - could you take care about this ?
(BTW, I fixed parse_expr.c broken for EXISTS...)
I'm going home now and will be here ~ 2 Feb 20:00 (PST). Hope to include
subselect code into CVS in the next 24 hrs (from now)...

Also, could someone take care about data/queries for regression tests ?
(May be by using "big boys"...)
This would be very helpful!

TIA,
    Vadim

pgsql-hackers by date:

Previous
From: James Hughes
Date:
Subject: Re: [HACKERS] VACUUM ANALYZE Problem (debugging output)
Next
From: Zeugswetter Andreas DBT
Date:
Subject: bug fix for select 'some Text'::char(16) (newest snapshot)