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 or flat)
Thread:
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
application.
It's possible to create a column in a given position in the columns
structure of a table?.

Thanks in advance.

--
Marc Soler


Responses

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
Subject:

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