Re: UNION result

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: UNION result
Дата
Msg-id 200301150414.h0F4E1N01118@candle.pha.pa.us
обсуждение исходный текст
Ответ на UNION result  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
I think the cause is that multi-type UNION queries use the first query
for casting the other parts of the UNION.  In the old days we would just
reject the query because the UNION columns are of different types.

---------------------------------------------------------------------------

Tatsuo Ishii wrote:
> 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
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: UNION result
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: UNION result