From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: anderson.ant.oli@gmail.com
Subject: BUG #15256: Comparing if a rowtype is null
Date: Fri, 29 Jun 2018 21:06:21 +0000
Message-ID: <153030638143.13254.5368602818503806766@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15256
Logged by: Anderson Antunes
Email address: anderson.ant.oli@gmail.com
PostgreSQL version: 9.3.5
Operating system: Windows
Description:
Hello. My name is Anderson Antunes. I'm from Brazil. I'd like to get more
information about the behavior of the query below using comparison
operators. From what I understand in the query result below, a composite
type variable is only null when all values are null. Similarly, a variable
is not null when all values are not null. However, when we have written a
null value and a non-null value, the "is_null" and "is not null" columns
remain false. I believe that if we have at least a pre-set value, the
operator should recognize that this variable is not null.
I hope you have understood what I think.
SELECT
r,
r IS NULL AS "is null",
r IS NOT NULL AS "is not null"
FROM (VALUES(NULL,NULL), (5, NULL), (5, 5)) r
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: noreply@postgresql.org, anderson.ant.oli@gmail.com
Subject: Re: BUG #15256: Comparing if a rowtype is null
In-Reply-To: <153030638143.13254.5368602818503806766@wrigleys.postgresql.org>
References: <153030638143.13254.5368602818503806766@wrigleys.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