From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hannu Krosing <hannu(at)2ndQuadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: strange IS NULL behaviour |
Date: | 2013-09-04 02:54:15 |
Message-ID: | 20130904025415.GN21874@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 3, 2013 at 10:27:38PM -0400, Tom Lane wrote:
> I wrote:
> > And I will say once more that a patch that affects only the behavior of
> > eval_const_expressions can be rejected on its face. That code has to be
> > kept in sync with the behavior of execQual.c, not just whacked around by
> > itself. And then there are the NOT NULL constraint cases to worry about.
>
> Hmm ... actually, it's already not in sync, because:
>
> regression=# create table tt (x int);
> CREATE TABLE
> regression=# insert into tt values(null);
> INSERT 0 1
> regression=# select row(x) from tt;
> row
> -----
> ()
> (1 row)
>
> regression=# select row(row(x)) from tt;
> row
> --------
> ("()")
> (1 row)
>
> regression=# select row(row(row(x))) from tt;
> row
> --------------
> ("(""()"")")
> (1 row)
Uh, I see the same output you show for a NULL constant:
SELECT ROW(NULL);
row
-----
()
SELECT ROW(ROW(NULL));
row
--------
("()")
SELECT ROW(ROW(ROW(NULL)));
row
--------------
("(""()"")")
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2013-09-04 02:56:20 | Re: strange IS NULL behaviour |
Previous Message | Bruce Momjian | 2013-09-04 02:46:38 | Re: strange IS NULL behaviour |