Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group