subquery syntax broken

From: "Vadim B(dot) Mikheev" <vadim(at)sable(dot)krasnoyarsk(dot)su>
To: hackers(at)postgresql(dot)org
Subject: subquery syntax broken
Date: 1998-02-02 10:54:01
Message-ID: 34D5A5C9.89143680@sable.krasnoyarsk.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Hughes 1998-02-02 11:45:57 Re: [HACKERS] VACUUM ANALYZE Problem (debugging output)
Previous Message Thomas G. Lockhart 1998-02-02 05:56:43 Re: [HACKERS] What is ##?