Re: ALTER TABLE ( smallinto -> boolean ) ... - Mailing list pgsql-hackers

From Greg Stark
Subject Re: ALTER TABLE ( smallinto -> boolean ) ...
Date
Msg-id 874q974l8p.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: ALTER TABLE ( smallinto -> boolean ) ...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> You could do something like
> 
> ... type boolean using case when field1=0 then false else true end;

Or you could save typing and just use "USING field1<>0"

Odd that everyone did a CASE for that.


-- 
greg



pgsql-hackers by date:

Previous
From: "David Parker"
Date:
Subject: Re: [Slony1-general] Re: dangling lock information?
Next
From: Tom Lane
Date:
Subject: Re: Intermittent stats test failures on buildfarm