Re: 'true'::TEXT::BOOLEAN - Mailing list pgsql-sql

From Markus Bertheau ☭
Subject Re: 'true'::TEXT::BOOLEAN
Date
Msg-id 1117800238.9816.26.camel@dicaprio.akademie1.de
Whole thread Raw
In response to Re: 'true'::TEXT::BOOLEAN  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-sql
В Птн, 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>



pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: 'true'::TEXT::BOOLEAN
Next
From: Michael Glaesemann
Date:
Subject: Re: 'true'::TEXT::BOOLEAN