Re: How to change column type in PostgreSQL 7.1.2

Поиск
Список
Период
Сортировка
От Williams, Travis L, NPONS
Тема Re: How to change column type in PostgreSQL 7.1.2
Дата
Msg-id AB815D267EC31A4693CC24D234F8291604DAB7F4@ACCLUST02EVS1.ugd.att.com
обсуждение исходный текст
Ответ на How to change column type in PostgreSQL 7.1.2  ("Vilson farias" <vilson.farias@digitro.com.br>)
Список pgsql-general
I don't know about the primary key part.. what I do is create a table identical to the one I'm copying (minus index's,
primarykeys, stuff like that) and copy my data over.. verify the data was copied.. then drop the original.. recreate
theoriginal the way you want.. then copy the data back over.. and verify.. then drop the temp table.. 

Travis

-----Original Message-----
From: Vilson farias [mailto:vilson.farias@digitro.com.br]
Sent: Thursday, June 12, 2003 7:54 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] How to change column type in PostgreSQL 7.1.2


Greetings,

  I'm wondering if there is a way to change a column type in PostgreSQL
7.1.2 without reconstruction of table + pg_dump/restore of table data
(machine can't be stopped for a long time). I have a table with a integer
column and I would like to change it to varchar(20). One more thing, this
collumn belongs to a composed primary key. Is it possible?

Best regards

----------------------------------------------------------------------------
----
José Vilson de Mello de Farias
Software Engineer

Dígitro Tecnologia Ltda - www.digitro.com.br
APC - Customer Oriented Applications
E-mail: vilson.farias@digitro.com.br
Tel.: +55 48 281 7158
ICQ 11866179


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Postgres performance comments from a MySQL user
Следующее
От: "Mattias Kregert"
Дата:
Сообщение: Re: How to change column type in PostgreSQL 7.1.2