From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Mickaël Jouanne <m(dot)jouanne(at)apr-job(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: smallint to bigint |
Date: | 2000-11-14 17:25:20 |
Message-ID: | Pine.BSF.4.21.0011140922080.67853-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
About all you can do is make a new table with the structure
you want and use insert into to copy the data and then alter
table to rename the tables in place. (One note though, if
you're trying to go from int2 to int8 it's kind of unhappy
for one step, you'll need to promote to int4 and then to int8
in the select).
Stephan Szabo
sszabo(at)bigpanda(dot)com
On Tue, 14 Nov 2000, [iso-8859-1] Mickal Jouanne wrote:
> Hello !
>
> I have a table with :
>
> prixandern | smallint |
> prixcvdern | smallint |
>
> but i want to change smallint to bigint without droping the table.
>
> How can i make that ?
From | Date | Subject | |
---|---|---|---|
Next Message | Mário Jorge Nunes Filipe | 2000-11-14 18:28:44 | Migrating some data |
Previous Message | Stephan Szabo | 2000-11-14 17:21:32 | Re: about time. |
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Morrow | 2000-11-14 23:04:20 | converting seconds since epoch to time string |
Previous Message | Peter Eisentraut | 2000-11-14 16:54:49 | Re: smallint to bigint |