Re: BUG REPORT: Unable to cast boolean::smallint

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: BUG REPORT: Unable to cast boolean::smallint
Дата
Msg-id 1415205062021-5825784.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: BUG REPORT: Unable to cast boolean::smallint  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG REPORT: Unable to cast boolean::smallint  (Marko Tiikkaja <marko@joh.to>)
Список pgsql-bugs
Tom Lane-2 wrote
> James Pittman <

> j.pittman@

> > writes:
>> It does not seem possible to be able to cast a boolean to a smallint.
>
> Well, there are also not direct casts provided from boolean to bigint,
> numeric, real, or double precision ;-).  I'm not terribly excited about
> this.

So why is there one for Boolean to int?

To the OP, why do you think you want one?

While I haven't used it much converting Boolean to zero/one for use in a
math formula is a known use case though likely one where the difference
between int and smallint would probably be marginalized.

David J.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-REPORT-Unable-to-cast-boolean-smallint-tp5825768p5825784.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

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

Предыдущее
От: gauchard@laas.fr
Дата:
Сообщение: BUG #11882: make HAVE_WORKING_LINK an option
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #11882: make HAVE_WORKING_LINK an option