Re: 'true'::TEXT::BOOLEAN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>
Cc: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>, "'PostgreSQL'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: 2005-06-03 13:47:11
Message-ID: 4300.1117806431@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <twanger(at)bluetwanger(dot)de> writes:
> Well, that's not my question. I have a plpgsql function like that:
> ...
> And I can't call it with a TEXT variable, because casting from TEXT to
> BOOLEAN isn't possible.

In plpgsql it is: just assign the text value to a boolean variable.
plpgsql's notions of type safety are pretty lax ;-)

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-06-03 14:16:34 Re: CASE WHEN foo IS NULL THEN DEFAULT ELSE foo END
Previous Message Markus Bertheau ☭ 2005-06-03 13:43:59 Re: 'true'::TEXT::BOOLEAN doesn't work