Re: Fixing a too long column value in a before insert trigger or rule

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fixing a too long column value in a before insert trigger or rule
Date: 2005-05-11 13:44:24
Message-ID: 3354.1115819064@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Csaba Nagy <nagy(at)ecircle-ag(dot)com> writes:
> We have a situation where a varchar column was limited to a too small
> maximum length in the design phase... shit happens, we will fix our db
> schema in our next database downtime or software version deployment,
> whichever comes first (we are using 7.4 and on the fly column type
> change is only from 8.0 on I guess).

Why don't you just hack the column's atttypmod? See the archives
(and practice on a test database ;-))

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-05-11 13:57:07 Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Previous Message Thomas F.O'Connell 2005-05-11 13:42:31 Re: SECURITY RELEASES: 7.2.8 - 7.3.10 - 7.4.8 - 8.0.3