Обсуждение: Re: Problems changing type of column using pgAd

Поиск
Список
Период
Сортировка

Re: Problems changing type of column using pgAd

От
Dave Page
Дата:

> -----Original Message-----
> From: Timon Meyer [mailto:timon@mustek.de]
> Sent: 18 December 2001 14:41
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Problems changing type of column
> using pgAdmin...
>
>
> Hello,
>
> I am a beginner in using the pgAdmin for Windows and I have following
> question:
>
> once I have created a table and a column it is not possible
> to change the field type or size within pgAdmin. Only
> possible is to add or remove a column, the other fields or
> disabled. Is there any possibility to change the field size
> and/or type using pgAdmin? Or do I have to do it manually
> using the ALTER TABLE SQL command?

Hi,

It is not possible in PostgreSQL (and by extension, pgAdmin) to alter a
column type, or drop a column. The easiest way to do this is to pg_dump your
database to a text file, then edit & reload a copy of this file as required.
Of course, you must ensure that your data will reload into the modified
table - in particular beware of changing test columns to numeric (for
example) or making text columns shorter.

As soon as PostgreSQL supports this features (hopefully in 7.3) I will
update pgAdmin to take advantage of them.

Regards, Dave.