Re: cast bool/int

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, Zdravko Balorda <zdravko(dot)balorda(at)siix(dot)com>
Subject: Re: cast bool/int
Date: 2009-03-23 14:33:27
Message-ID: 20090323143326.GK6840@eddie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marcin Krawczyk 2009-03-23 14:44:31 Re: cast bool/int
Previous Message Tom Lane 2009-03-23 14:05:02 Re: [SQL] bash & postgres