From: Bruno Wolff III <bruno@wolff.to>
To: Markus Bertheau ??? <twanger@bluetwanger.de>
Cc: Michael Glaesemann <grzm@myrealbox.com>
Cc: PostgreSQL <pgsql-sql@postgresql.org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: Fri, 3 Jun 2005 10:11:25 -0500
Message-ID: <20050603151125.GA10971@wolff.to> (raw)
In-Reply-To: <1117801417.9816.28.camel@dicaprio.akademie1.de>
References: <Pine.LNX.4.44.0506031420340.23350-100000@matrix.gatewaynet.com>
<1117799555.9816.24.camel@dicaprio.akademie1.de>
<3DCEDE55-9D4A-4F4E-8907-ADCC058A3398@myrealbox.com>
<1117801417.9816.28.camel@dicaprio.akademie1.de>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, twanger@bluetwanger.de, grzm@myrealbox.com
Subject: Re: 'true'::TEXT::BOOLEAN
In-Reply-To: <20050603151125.GA10971@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox