Re: UNION result - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: UNION result
Date
Msg-id GNELIHDDFBOCMGBFGEFOIEAICFAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to UNION result  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Seems fine to me - the second select being cast to the type of the first
select.

Chris

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Tatsuo Ishii
> Sent: Wednesday, 15 January 2003 12:04 PM
> To: pgsql-hackers@postgresql.org
> Subject: [HACKERS] UNION result
>
>
> Does anybody know:
>
> select 1.0 union select 1;
> or
> select 1 union select 1.0;
>
> should return 1 or 1.0?
>
> I see below on my Linux box:
>
> test=# select 1 union select 1.0;
>  ?column?
> ----------
>         1
> (1 row)
>
> test=# select 1.0 union select 1;
>  ?column?
> ----------
>       1.0
> (1 row)
>
> This seems a little bit inconsistent...
> --
> Tatsuo Ishii
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: UNION result
Next
From: Stephan Szabo
Date:
Subject: Re: UNION result