Re: 'true'::TEXT::BOOLEAN

Поиск
Список
Период
Сортировка
От Markus Bertheau ☭
Тема Re: 'true'::TEXT::BOOLEAN
Дата
Msg-id 1117804023.9816.30.camel@dicaprio.akademie1.de
обсуждение исходный текст
Ответ на Re: 'true'::TEXT::BOOLEAN  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: 'true'::TEXT::BOOLEAN doesn't work
Список pgsql-sql
В Птн, 03/06/2005 в 15:46 +0300, Achilleus Mantzios пишет:

> Also according to the docs:
> http://www.postgresql.org/docs/current/static/datatype-boolean.html
> 
> "Tip: Values of the boolean type cannot be cast directly to other types 
> (e.g., CAST (boolval AS integer) does not work). This can be accomplished 
> using the CASE expression: CASE WHEN boolval THEN 'value if true' ELSE 
> 'value if false' END."

Ah, that works. Thanks very much.

Markus
-- 
Markus Bertheau ☭ <twanger@bluetwanger.de>



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

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: 'true'::TEXT::BOOLEAN
Следующее
От: Markus Bertheau ☭
Дата:
Сообщение: CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END