Re: 'true'::TEXT::BOOLEAN - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: 'true'::TEXT::BOOLEAN
Date
Msg-id 20050603153659.GA12878@wolff.to
Whole thread Raw
In response to Re: 'true'::TEXT::BOOLEAN  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Fri, Jun 03, 2005 at 11:28:02 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> That won't actually work either, because boolin wants cstring:

Thanks for pointing that out. I was actually surprised to see my test work,
since I knew boolin expected cstring. I forgot that by not providing a type
strings get treated specially.
> There's been discussion of allowing all datatypes to be explicitly
> casted to or from text by generating conversions like these
> automatically.  But I'm not sure if everyone's convinced it's a good
> idea or not.  You'd also have to argue about whether varchar should
> be included in the special dispensation ...

I don't remember ever running accross documentation on how to solve this
problem. Even something noting that most of the type input and output
functions are named typein and typeout and that to convert to text you can
use textin(typeout(typevalue)) and to convert from text you can use
typein(textout(text)) would probably be good enough.


pgsql-sql by date:

Previous
From: Markus Bertheau ☭
Date:
Subject: Re: 'true'::TEXT::BOOLEAN
Next
From: PFC
Date:
Subject: Re: getting details about integrity constraint violation