Re: casting BOOL to somthng - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: casting BOOL to somthng
Date
Msg-id 20040901002131.P60523@megazone.bigpanda.com
Whole thread Raw
In response to Re: casting BOOL to somthng  (sad <sad@bankir.ru>)
Responses casting UNKNOWN to REGCLASS  (sad <sad@bankir.ru>)
List pgsql-sql
On Wed, 1 Sep 2004, sad wrote:

> > There's a difference between an output function and a cast to text.
> > One gives you an external representation of the data for end use.  The
> > other gives you an internal representation for manipulation.
>
> And at the same time
>
> 't'::TEXT can be casted to BOOL
> 't'::BOOL
>
> but reverse.

select 't'::text::bool;
ERROR:  cannot cast type text to boolean

If you're thinking 't'::bool, that's something different.


pgsql-sql by date:

Previous
From: sad
Date:
Subject: Re: casting BOOL to somthng
Next
From: sad
Date:
Subject: casting UNKNOWN to REGCLASS