From: Markus Bertheau ☭ <twanger@bluetwanger.de>
To: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: 'PostgreSQL' <pgsql-sql@postgresql.org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: Fri, 03 Jun 2005 14:03:58 +0200
Message-ID: <1117800238.9816.26.camel@dicaprio.akademie1.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0506031442080.23350-100000@matrix.gatewaynet.com>
References: <Pine.LNX.4.44.0506031442080.23350-100000@matrix.gatewaynet.com>
В Птн, 03/06/2005 в 14:45 +0300, Achilleus Mantzios пишет:
> Then use the
> case when ... then ... when ... then ... else ... end
> construct, e.g.
> case when mytext='true' then 't'::boolean else 'f'::boolean end
Because I don't want to reimplement postgres' boolean parsing.
> Hmm, why dont you leave it as 'true' or 'false' without any castings.
Because then pg doesn't find the function because it looks for one with
a text argument.
Markus
--
Markus Bertheau ☭ <twanger@bluetwanger.de>
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: twanger@bluetwanger.de, achill@matrix.gatewaynet.com
Subject: Re: 'true'::TEXT::BOOLEAN
In-Reply-To: <1117800238.9816.26.camel@dicaprio.akademie1.de>
* 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