Re: casting BOOL to somthng

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: sad <sad(at)bankir(dot)ru>
Cc: Michael Glaesemann <grzm(at)myrealbox(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: casting BOOL to somthng
Date: 2004-09-01 07:22:26
Message-ID: 20040901002131.P60523@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Geoffrey 2004-09-01 10:25:30 Re: casting BOOL to somthng
Previous Message Stephan Szabo 2004-09-01 07:16:03 Re: casting BOOL to somthng