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

From Joshua Tolley
Subject Re: cast bool/int
Date
Msg-id 20090323143326.GK6840@eddie
Whole thread Raw
In response to Re: cast bool/int  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Responses Re: cast bool/int
List pgsql-sql
On Mon, Mar 23, 2009 at 10:18:31AM +0200, Achilleas Mantzios wrote:
> Στις Monday 23 March 2009 09:59:12 ο/η Zdravko Balorda έγραψε:
> >
> > Hi,
> > I need a casting operator from boolean to integer,
> > tu put in ALTER TABLE statment after USING.
> >
>
> Sorry in the above email i meant smth like
> CASE WHEN column='t' THEN 1 ELSE 0 END

Or just CASE WHEN column THEN 1 ELSE 0 END.

- Josh / eggyknap

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: bash & postgres
Next
From: Marcin Krawczyk
Date:
Subject: Re: cast bool/int