Re: 'true'::TEXT::BOOLEAN

From: Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>
To: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: "'PostgreSQL'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: 2005-06-03 12:03:58
Message-ID: 1117800238.9816.26.camel@dicaprio.akademie1.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)bluetwanger(dot)de>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2005-06-03 12:14:18 Re: 'true'::TEXT::BOOLEAN
Previous Message Markus Bertheau ☭ 2005-06-03 11:52:35 Re: 'true'::TEXT::BOOLEAN