From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: glennwidener@gmail.com
Subject: BUG #16945: where value in (null) set results inconsistent
Date: Sun, 28 Mar 2021 21:44:47 +0000
Message-ID: <16945-b758f752890b2b8e@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16945
Logged by: Glenn Widener
Email address: glennwidener@gmail.com
PostgreSQL version: 11.5
Operating system: Windows 10
Description:
Pursuant to a fix in Hibernate, that uses "where value in (null)" as a
workaround for several DB's not handling "where value in ()":
https://hibernate.atlassian.net/browse/HHH-8091
Consider this inconsistency:
test-db=> select id from project_type_variants where id in (0);
id
----
(0 rows)
test-db=> select id from project_type_variants where id in (null);
id
----
(0 rows)
test-db=> select id from project_type_variants where id not in (0);
id
----
1
2
3
(3 rows)
test-db=> select id from project_type_variants where id not in (null);
id
----
(0 rows)
Needs to work consistently, because (null) is a required workaround for:
test-db=> select id from project_type_variants where id in ();
ERROR: syntax error at or near ")"
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, glennwidener@gmail.com
Subject: Re: BUG #16945: where value in (null) set results inconsistent
In-Reply-To: <16945-b758f752890b2b8e@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