Alter column length

From: "Dan Wilson" <phpPgAdmin(at)acucore(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Alter column length
Date: 2001-03-23 16:28:39
Message-ID: 000f01c0b3b6$513c25d0$543987cf@corp.peoplesoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to alter the length of a column without dumping an re-creating the
table.

I found this method in the archives and was just wondering if there are any
side effects...

-----------------------------
update pg_attribute set atttypmod = [column_oid] where attname =
'[column_name]' where attrelid = (select oid from pg_class where relname =
'[table_name]');
-----------------------------

Will doing this cause any problems?

-Dan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mihai Gheorghiu 2001-03-23 16:29:43 Migration from MSAccess
Previous Message Stephan Szabo 2001-03-23 16:21:21 Re: Lost Trigger(s)?