Re: ALTER COLUMN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Fran Fabrizio <ffabrizio(at)exchange(dot)webmd(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: ALTER COLUMN
Date: 2001-05-08 22:09:20
Message-ID: 8754.989359760@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian Marschalek 2001-05-08 22:16:33 Inheritance and Referencing troubles... (confusing problem)
Previous Message Fran Fabrizio 2001-05-08 21:54:07 Re: select off of a view going slowly