Re: Casting help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mitch Vincent" <mitch(at)venux(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Casting help
Date: 2001-02-12 20:19:15
Message-ID: 21384.982009155@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Mitch Vincent" <mitch(at)venux(dot)net> writes:
> if I try to cast minority to varchar (or anything else for that matter) I
> get
> ERROR: Cannot cast type 'bool' to 'varchar'

There's always

CASE WHEN minority THEN 't' ELSE 'f' END

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2001-02-12 20:25:23 Re: Trigger/Function Problem
Previous Message Brice Ruth 2001-02-12 19:57:43 Re: (Update) Implicit smallint to boolean conversion?