SELECT * FROM a WHERE id IN (sub query) . When sub query is incorrect . return all rows of table a - Mailing list pgsql-bugs

From 逗比请来的猴子
Subject SELECT * FROM a WHERE id IN (sub query) . When sub query is incorrect . return all rows of table a
Date
Msg-id tencent_C931F3C82E827FD2FC5E9E544124FF202E05@qq.com
Whole thread Raw
Responses Re: SELECT * FROM a WHERE id IN (sub query) . When sub query is incorrect . return all rows of table a
List pgsql-bugs
When I have 2 tables like this 

create table test
(
id                int4,
shapeid        int4
);

table testb
(
id                 int4
);


table test has 4 records and table has 1 recors.

sql  " select shapeid from testb; "     Failed.                                                    

but  sql  " select * from test where shapeid in ( SELECT shapeid FROM testb ); "  return all records of table test                

sql like this delete all records of my talbe !

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16496: can't move to next line on Query Editor
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #16496: can't move to next line on Query Editor