Re: BUG #1847: Error in some kind of UNION query.
От | Michael Fuhr |
---|---|
Тема | Re: BUG #1847: Error in some kind of UNION query. |
Дата | |
Msg-id | 20050825140912.GA52581@winnie.fuhr.org обсуждение исходный текст |
Ответ на | BUG #1847: Error in some kind of UNION query. ("THIBAULT Jean-Jacques" <jjt4@wanadoo.fr>) |
Список | 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
В списке pgsql-bugs по дате отправления: