Re: 'true'::TEXT::BOOLEAN

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: 'true'::TEXT::BOOLEAN
Дата
Msg-id 20050603151125.GA10971@wolff.to
обсуждение исходный текст
Ответ на Re: 'true'::TEXT::BOOLEAN  (Markus Bertheau ☭ <twanger@bluetwanger.de>)
Ответы Re: 'true'::TEXT::BOOLEAN
Список pgsql-sql
On Fri, Jun 03, 2005 at 14:23:37 +0200, Markus Bertheau ??? <twanger@bluetwanger.de> wrote:
> This also bypasses the built in postgresql boolean literal parsing.
> 
> I think casting from text to boolean should be possible, and use the
> same algorithm that's used when casting from "unknown" to boolean.

You probably want boolin.

area=> select boolin('0'), boolin('f'), boolin('false');boolin | boolin | boolin
--------+--------+--------f      | f      | f
(1 row)

Note that the function will error out if the argument is garbage.


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

Предыдущее
От: Ami Ganguli
Дата:
Сообщение: using a selected row as a function parameter
Следующее
От: Tom Lane
Дата:
Сообщение: Re: using a selected row as a function parameter