pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18001: Invalid subquery passed as true
2+ messages / 2 participants
[nested] [flat]
* BUG #18001: Invalid subquery passed as true
@ 2023-06-26 10:07 PG Bug reporting form <noreply@postgresql.org>
2023-06-26 11:34 ` Re: BUG #18001: Invalid subquery passed as true Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2023-06-26 10:07 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: pvham90@gmail.com
The following bug has been logged on the website:
Bug reference: 18001
Logged by: Piet van Ham
Email address: pvham90@gmail.com
PostgreSQL version: 11.20
Operating system: Linux
Description:
create table table_a (column_a varchar(16), column_b varchar(16));
create table table_b (column_c varchar(16), column_d varchar(16));
insert into table_a (column_a, column_b) values ('row1a','row1b');
insert into table_b (column_c, column_d) values ('row2a','row2b');
delete from table_a where column_a in (select column_a from table_b); --the
subquery is invalid, but the where clause is passed as true resulting in all
records deleted
select count(*) from table_a;
-- 0
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #18001: Invalid subquery passed as true
2023-06-26 10:07 BUG #18001: Invalid subquery passed as true PG Bug reporting form <noreply@postgresql.org>
@ 2023-06-26 11:34 ` Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Julien Rouhaud @ 2023-06-26 11:34 UTC (permalink / raw)
To: pvham90@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
hi
On Mon, 26 Jun 2023, 19:11 PG Bug reporting form, <noreply@postgresql.org>
wrote:
> The following bug has been logged on the website:
>
> Bug reference: 18001
> Logged by: Piet van Ham
> Email address: pvham90@gmail.com
> PostgreSQL version: 11.20
> Operating system: Linux
> Description:
>
> create table table_a (column_a varchar(16), column_b varchar(16));
> create table table_b (column_c varchar(16), column_d varchar(16));
>
> insert into table_a (column_a, column_b) values ('row1a','row1b');
> insert into table_b (column_c, column_d) values ('row2a','row2b');
>
> delete from table_a where column_a in (select column_a from table_b); --the
> subquery is invalid, but the where clause is passed as true resulting in
> all
> records deleted
>
> select count(*) from table_a;
> -- 0
>
this is unfortunately working as required by the sql standard, see
https://wiki.postgresql.org/wiki/FAQ#Why_doesn.27t_PostgreSQL_report_a_column_not_found_error_when_u...
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-06-26 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 10:07 BUG #18001: Invalid subquery passed as true PG Bug reporting form <noreply@postgresql.org>
2023-06-26 11:34 ` Julien Rouhaud <rjuju123@gmail.com>
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