pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14426: union causes error
2+ messages / 2 participants
[nested] [flat]
* BUG #14426: union causes error
@ 2016-11-16 14:25 abo@zetescards.be
2016-11-16 15:42 ` Re: BUG #14426: union causes error Vik Fearing <vik@2ndquadrant.fr>
0 siblings, 1 reply; 2+ messages in thread
From: abo@zetescards.be @ 2016-11-16 14:25 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14426
Logged by: Alain Bourgeois
Email address: abo@zetescards.be
PostgreSQL version: 9.6.1
Operating system: Linux
Description:
select null union select null union select 1
causes an error.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14426: union causes error
2016-11-16 14:25 BUG #14426: union causes error abo@zetescards.be
@ 2016-11-16 15:42 ` Vik Fearing <vik@2ndquadrant.fr>
0 siblings, 0 replies; 2+ messages in thread
From: Vik Fearing @ 2016-11-16 15:42 UTC (permalink / raw)
To: abo@zetescards.be; pgsql-bugs
On 11/16/2016 03:25 PM, abo@zetescards.be wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14426
> Logged by: Alain Bourgeois
> Email address: abo@zetescards.be
> PostgreSQL version: 9.6.1
> Operating system: Linux
> Description:
>
> select null union select null union select 1
>
> causes an error.
First of all, it is standard practice to say what the error is.
This is not a bug, but a known limitation. In your first query, your
column is of type "unknown", but when you union it with another unknown
type, it gets turned into text. Unioning text with integer is what is
giving you your error.
The solution is to make sure you type your data, at least in the first
query.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-11-16 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 14:25 BUG #14426: union causes error abo@zetescards.be
2016-11-16 15:42 ` Vik Fearing <vik@2ndquadrant.fr>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox