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

Re: delete column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>,"Hillensbeck, Preston" <PHillensbeck(at)sfbcic(dot)com>,"'webmaster'" <webmaster(at)harbornet(dot)com>,"'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: delete column
Date: 2002-04-27 15:08:59
Message-ID: 20630.1019920139@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> Oops my mistake!  I actually didn't use select into to create the table, 
>> because I didn't want the columns exactly the same as before - was 
>> switching from varchar to text.

> Oh, yes, that makes sense for your case. You can't control the data
> types with SELECT INTO.

You could with an explicit cast:

	SELECT varcharcol::text INTO newtable FROM ...

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Jochem van DietenDate: 2002-04-27 15:11:20
Subject: Re: delete column
Previous:From: Thomas LockhartDate: 2002-04-27 14:56:53
Subject: Mandrake 8.1 RPMs posted

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