Re: 'true'::TEXT::BOOLEAN

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Markus Bertheau ??? <twanger(at)bluetwanger(dot)de>, Michael Glaesemann <grzm(at)myrealbox(dot)com>, PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: 'true'::TEXT::BOOLEAN
Date: 2005-06-03 15:36:59
Message-ID: 20050603153659.GA12878@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Jun 03, 2005 at 11:28:02 -0400,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message PFC 2005-06-03 18:42:34 Re: getting details about integrity constraint violation
Previous Message Markus Bertheau ☭ 2005-06-03 15:36:24 Re: 'true'::TEXT::BOOLEAN