Skip site navigation (1) Skip section navigation (2)

About changing type af a column

From: "Marc Soler" <msoler(at)el-valles(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: About changing type af a column
Date: 2003-03-26 09:39:19
Message-ID: 03b401c2f37b$97512640$0300a8c0@terra (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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
It's possible to create a column in a given position in the columns
structure of a table?.

Thanks in advance.

Marc Soler


pgsql-admin by date

Next:From: Victor YegorovDate: 2003-03-26 09:56:06
Subject: Re: About changing type af a column
Previous:From: Anagha JoshiDate: 2003-03-26 08:48:20

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group