Re: Why is a union of two null-results automatically casted to type text ?

Поиск
Список
Период
Сортировка
От Frank van Vugt
Тема Re: Why is a union of two null-results automatically casted to type text ?
Дата
Msg-id 200406161042.08842.ftm.van.vugt@foxi.nl
обсуждение исходный текст
Ответ на Re: Why is a union of two null-results automatically casted to type text ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> > But in a UNION ALL the distinctiveness isn't an issue, is it?

> True.  We do not currently distinguish UNION from UNION ALL as far as
> datatype assignment rules go

<cut>

> I'm not sure if it'd be a good idea to do so or not.  It'd
> make this particular example work the way you want, but otherwise it
> seems like making UNION ALL a special case would be a bit of a wart on
> the type system.

Well, in my case there's no situation where I don't know in advance where the
problem could occur, so it's easily avoided by proper typing of the first
null in the union all sequence.


Thanks for the explanation.






--
Best,




Frank.


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

Предыдущее
От: Joolz
Дата:
Сообщение: reference to a view
Следующее
От: Christophe Musielak
Дата:
Сообщение: 7.4 performance issue