Skip site navigation (1) Skip section navigation (2)

Re: BUG #1847: Error in some kind of UNION query.

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
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:13:23
Message-ID: 430DD203.4040507@pse-consulting.de (view raw or flat)
Thread:
Lists: pgsql-bugs
THIBAULT Jean-Jacques wrote:
> The following bug has been logged online:
> 
> Bug reference:      1847
> Logged by:          THIBAULT Jean-Jacques
> Email address:      jjt4(at)wanadoo(dot)fr
> PostgreSQL version: 8.0.3
> Operating system:   Linux (Mandrake)
> Description:        Error in some kind of UNION query.
> Details: 
> 
> this query work :
> select null UNION 1;
> 
> this query doesn't work :
> select null UNION null UNION 1;
> 
> ERROR:  UNION types text and integer cannot be matched

You probably mean
SELECT NULL
UNION
SELECT NULL
UNION
SELECT 1

Proper casting will help, insuring the correct type can be determined 
from the first SELECT. Changing the order to have SELECT 1 does the job too.

Regards,
Andreas

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-08-25 16:03:02
Subject: Re: BUG #1847: Error in some kind of UNION query.
Previous:From: Michael FuhrDate: 2005-08-25 14:09:12
Subject: Re: BUG #1847: Error in some kind of UNION query.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group