From: 逗比请来的猴子 <xh2432@vip.qq.com>
To: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: SELECT * FROM a WHERE id IN (sub query) . When sub query is incorrect . return all rows of table a
Date: Wed, 17 Jun 2020 22:56:10 +0800
Message-ID: <tencent_C931F3C82E827FD2FC5E9E544124FF202E05@qq.com> (raw)
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 !
Attachments:2FFAC80B@56932806.0A2FEA5E.png.jpg (image/jpeg, 17.6K) downloadview image0006A22B@0BD9BF6D.0A2FEA5E.png.jpg (image/jpeg, 14.8K) downloadview image
pg_test1.png (application/octet-stream, 17.6K) download
pg_test2.png (application/octet-stream, 8.8K) download
pg_test3.png (application/octet-stream, 7.4K) download
pg_test4.png (application/octet-stream, 14.8K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: xh2432@vip.qq.com
Subject: Re: SELECT * FROM a WHERE id IN (sub query) . When sub query is incorrect . return all rows of table a
In-Reply-To: <tencent_C931F3C82E827FD2FC5E9E544124FF202E05@qq.com>
References: <tencent_C931F3C82E827FD2FC5E9E544124FF202E05@qq.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox