From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | THIBAULT Jean-Jacques <jjt4(at)wanadoo(dot)fr> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1847: Error in some kind of UNION query. |
Date: | 2005-08-25 14:09:12 |
Message-ID: | 20050825140912.GA52581@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Aug 25, 2005 at 09:53:26AM +0100, THIBAULT Jean-Jacques wrote:
>
> this query work :
> select null UNION 1;
Please show the *exact* query. The above produces a syntax error:
test=> select null UNION 1;
ERROR: syntax error at or near "1" at character 19
LINE 1: select null UNION 1;
^
I suspect this is the actual query:
test=> select null UNION select 1;
?column?
----------
1
(2 rows)
> this query doesn't work :
> select null UNION null UNION 1;
>
> ERROR: UNION types text and integer cannot be matched
Again, the query as written causes a syntax error. This is probably
the actual query:
test=> select null UNION select null UNION select 1;
ERROR: UNION types text and integer cannot be matched
To understand what's happening, see "UNION, CASE, and ARRAY Type
Resolution" in the "Type Conversion" chapter of the documentation:
http://www.postgresql.org/docs/8.0/static/typeconv-union-case.html
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2005-08-25 14:13:23 | Re: BUG #1847: Error in some kind of UNION query. |
Previous Message | THIBAULT Jean-Jacques | 2005-08-25 08:53:26 | BUG #1847: Error in some kind of UNION query. |