Skip site navigation (1) Skip section navigation (2)

Re: cannot cast type boolean to text?

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "Brian Hurt" <bhurt(at)janestcapital(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: cannot cast type boolean to text?
Date: 2007-06-14 18:41:10
Message-ID: bf54be870706141141k58fd91f2hd01bde4addfd5516@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
You can do this by creating a custom cast for it.

--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 6/14/07, Brian Hurt <bhurt(at)janestcapital(dot)com> wrote:
>
> I'm not sure if this is the right
> So when I do:
>     SELECT true :: text;
> in psql, I get back:
>
> ERROR:  cannot cast type boolean to text
>
> I was wondering why this is so.  Unfortunately, the place where I hit
> the problem was in a function that takes arguments of type ANYELEMENT
> and wants to convert them to text.  Which doesn't make it impossible to
> work around this, just more annoying.
>
> This is Postgres 8.1.4.
>
> Would this be something worthwhile to post to Hackers?
>
> Brian
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

In response to

pgsql-novice by date

Next:From: Shoaib MirDate: 2007-06-14 18:43:32
Subject: Re: cannot cast type boolean to text?
Previous:From: Tom LaneDate: 2007-06-14 18:38:45
Subject: Re: cannot cast type boolean to text?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group