Re: 'true'::TEXT::BOOLEAN

From: Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>
To: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: Michael Glaesemann <grzm(at)myrealbox(dot)com>, PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: 2005-06-03 13:07:03
Message-ID: 1117804023.9816.30.camel@dicaprio.akademie1.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

В Птн, 03/06/2005 в 15:46 +0300, Achilleus Mantzios пишет:

> Also according to the docs:
> http://www.postgresql.org/docs/current/static/datatype-boolean.html
>
> "Tip: Values of the boolean type cannot be cast directly to other types
> (e.g., CAST (boolval AS integer) does not work). This can be accomplished
> using the CASE expression: CASE WHEN boolval THEN 'value if true' ELSE
> 'value if false' END."

Ah, that works. Thanks very much.

Markus
--
Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Markus Bertheau ☭ 2005-06-03 13:17:26 CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END
Previous Message Achilleus Mantzios 2005-06-03 12:46:48 Re: 'true'::TEXT::BOOLEAN