Re: About changing type af a column

Поиск
Список
Период
Сортировка
От Victor Yegorov
Тема Re: About changing type af a column
Дата
Msg-id 20030326095606.GH1556@pirmabanka.lv
обсуждение исходный текст
Ответ на About changing type af a column  ("Marc Soler" <msoler@el-valles.com>)
Ответы Re: About changing type af a column  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-admin
* Marc Soler <msoler@el-valles.com> [26.03.2003 11:48]:
> Hi all,
>
> I need to change a column length.
>
> >From varchar(150) to varchar(250).
>
> It's easy to change with an ALTER command? Or I need to create a new column,
> copy all data from the old column to the new one, then drop the old and
> rename the new.
>
> If only exists the second solutions, the new column it will be created last
> one of the columns, then I must change all INSERT and UPDATE commands in my
> application.

How order of fields in the table can affect UPDATE statements?

About INSERTs - it's a good thing to specify all fields being inserted just
to prevent 'inconveniences' like you've mentioned.

> It's possible to create a column in a given position in the columns
> structure of a table?.

Yes. create a new table with same design except for the field you'd like to
change, than copy all data into new table, drop old one and rename new one.

>
> Thanks in advance.

--

Victor Yegorov

Вложения

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

Предыдущее
От: "Marc Soler"
Дата:
Сообщение: About changing type af a column
Следующее
От: sdurand@insa-rouen.fr
Дата:
Сообщение: [Fwd: JSP ???]