Re: ALTER TABLE ( smallinto -> boolean ) ...

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER TABLE ( smallinto -> boolean ) ...
Date: 2005-08-30 13:17:42
Message-ID: 874q974l8p.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-08-30 13:50:11 Re: Intermittent stats test failures on buildfarm
Previous Message Jeff Trout 2005-08-30 12:28:18 Re: SHMMAX seems entirely broken in OS X 10.4.2

Browse pgsql-sql by date

  From Date Subject
Next Message Halley Pacheco de Oliveira 2005-08-30 13:43:33 Re: question
Previous Message Akshay Mathur 2005-08-30 13:11:14 Re: sql function: using set as argument