Re: delete column - Mailing list pgsql-general

From Tom Lane
Subject Re: delete column
Date
Msg-id 20630.1019920139@sss.pgh.pa.us
Whole thread Raw
In response to Re: delete column  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: delete column
List pgsql-general
Bruce Momjian <pgman@candle.pha.pa.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

pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: [HACKERS] Mandrake 8.1 RPMs posted
Next
From: Jochem van Dieten
Date:
Subject: Re: delete column