pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: pvham90@gmail.com
Subject: BUG #18001: Invalid subquery passed as true
Date: Mon, 26 Jun 2023 10:07:11 +0000
Message-ID: <18001-6c2b79083f5a35f3@postgresql.org> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <18001-6c2b79083f5a35f3@postgresql.org>
Permalink:  ../18001-6c2b79083f5a35f3@postgresql.org/
Also on:    postgresql.org/message-id/18001-6c2b79083f5a35f3@postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, pvham90@gmail.com
  Subject: Re: BUG #18001: Invalid subquery passed as true
  In-Reply-To: <18001-6c2b79083f5a35f3@postgresql.org>

* 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