Re: altering data type in a column

Поиск
Список
Период
Сортировка
От Len Morgan
Тема Re: altering data type in a column
Дата
Msg-id 005601c0e788$9ebc8f60$0908a8c0@H233.bstx.cc
обсуждение исходный текст
Ответ на altering data type in a column  ("Madness" <devrim@oper.metu.edu.tr>)
Список pgsql-general
The simple answer: No.  What has been suggested here numerous times (check
the archives) is the following procedure:

pg_dump the table you want to change to a text file.
edit the dump file and change the CREATE TABLE section to have an int type
instead of char.
DROP the original table
read in ( \i ) the modified dump table.

You need to make sure that there are NO non-integers in the field you are
changing!

len morgan

-----Original Message-----
From: Madness <devrim@oper.metu.edu.tr>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Date: Monday, May 28, 2001 10:05 AM
Subject: [GENERAL] altering data type in a column


>Hi,
>
>I have a table in one of my databases which has a row of type char. I would
>like to convert it to int data type. Is there an easy way for doing it?
>
>With regards,
>Devrim GÜNDÜZ
>devrim@oper.metu.edu.tr
>
>
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://www.postgresql.org/search.mpl
>


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

Предыдущее
От: "Len Morgan"
Дата:
Сообщение: Re: problem with buffer in psql
Следующее
От: Justin Clift
Дата:
Сообщение: Re: CLISP ?