Tom Lane <t...@sss.pgh.pa.us> wrote:
 
> so far as I can see the spec simply disallows a
> not-explicitly-cast NULL constant in cases like this, which seems
> if anything even less friendly than what we're doing.
 
Just to illustrate the current behavior:
 
test=# select null union select 1;
 ?column?
----------
        1

(2 rows)

test=# select null union select null union select 1;
ERROR:  UNION types text and integer cannot be matched
LINE 1: select null union select null union select 1;
                                                   ^
test=# select null union (select null union select 1);
 ?column?
----------

        1
(2 rows)
 
So, we're talking about making the second of these three cases work,
too.  I'm not sure the spec requires *any* of them to work.
 
-Kevin

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to