The following bug has been logged on the website:

Bug reference:      8513
Logged by:          Tommi Korhonen
Email address:      tommi.korho...@thl.fi
PostgreSQL version: 8.4.17
Operating system:   Redhat Linux
Description:        

Example:


create table t1(a integer);
create table t2(b integer);
create table t3(c integer);


select null from t1
union all
select null from t2
union all
select c from t3;


produces an error


ERROR:  UNION types text and integer cannot be matched
LINE 5: select c from t3;


but 


select null from t2
union all
select c from t3;


works correctly.


So it seems that if there are more than one nulls before field c in union
PostreSQL thinks merged field's data type is text.



-- 
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