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

Re: cannot cast type boolean to text?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:38:45
Message-ID: 16941.1181846325@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Brian Hurt <bhurt(at)janestcapital(dot)com> writes:
>     SELECT true :: text;
> ERROR:  cannot cast type boolean to text

> I was wondering why this is so.

Because there's no pg_cast entry for this conversion.

There will be one in 8.3, but for older releases make your own with
CREATE CAST.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Shoaib MirDate: 2007-06-14 18:41:10
Subject: Re: cannot cast type boolean to text?
Previous:From: Brian HurtDate: 2007-06-14 18:30:44
Subject: cannot cast type boolean to text?

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