Re: cast bool/int - Mailing list pgsql-sql

From Jasen Betts
Subject Re: cast bool/int
Date
Msg-id gqa94q$kv1$3@reversiblemaps.ath.cx
Whole thread Raw
In response to cast bool/int  (Zdravko Balorda <zdravko.balorda@siix.com>)
List pgsql-sql
On 2009-03-23, Zdravko Balorda <zdravko.balorda@siix.com> wrote:
>
> Hi,
> I need a casting operator from boolean to integer,
 you can use any expression....

> tu put in ALTER TABLE statment after USING.
>
> Any ideas? Thanks.
CASE WHEN columname THEN 1 WHEN NOT columname THEN 0 ELSE NULL END



pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: alter table on a large db
Next
From: Jasen Betts
Date:
Subject: Re: SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps