Re: ALTER COLUMN - Mailing list pgsql-general

From Tom Lane
Subject Re: ALTER COLUMN
Date
Msg-id 8754.989359760@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER COLUMN  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Peter Eisentraut <peter_e@gmx.net> writes:
> Fran Fabrizio writes:
>> What's the best way to alter a column definition after the fact (i.e.
>> int8-->int4).  Is the answer dump, drop table, make new table with new
>> definition and same name, import data?

> Yes.

Dump and reload can be avoided by inserting the data into a temp table
instead.  Should be at least somewhat faster.

            regards, tom lane

pgsql-general by date:

Previous
From: Fran Fabrizio
Date:
Subject: Re: select off of a view going slowly
Next
From: "Christian Marschalek"
Date:
Subject: Inheritance and Referencing troubles... (confusing problem)