Re: Casting help - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Casting help
Date
Msg-id Pine.LNX.4.30.0102122034420.1100-100000@peter.localdomain
Whole thread Raw
In response to Casting help  ("Mitch Vincent" <mitch@venux.net>)
List pgsql-general
Mitch Vincent writes:

> if I try to cast minority to varchar (or anything else for that matter) I
> get
>
> ERROR:  Cannot cast type 'bool' to 'varchar'

Try:  CASE WHEN minority THEN 'value of true' ELSE 'value if false' END

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Casting help
Next
From: Lamar Owen
Date:
Subject: Re: 7.1 installation problem