Re: changing varchar limits

From: Kevin Brannen <kevinb(at)nurseamerica(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: changing varchar limits
Date: 2002-08-02 22:03:55
Message-ID: 3D4B01CB.4000907@nurseamerica.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephan Szabo wrote:
> On Thu, 1 Aug 2002, Jeff Davis wrote:
>
>
>>What's the easiest way to change the allowable length of a varchar attribute?
>>
>>I looked in pg_attribute and noticed that the allowable length of the varchar
>>(+4 bytes for the actual length, presumably) was the atttypemod attribute of
>>the pg_attribute relation. Is it safe to change that? I would of course need
>>to be a superuser.
>
>
> That should be safe to change. If you're lowering it, you should make
> sure the data fits.

To easily change a column from nullable to not-nullable, is flipping the
proper attribute all that's required? Just asking, cause it would be
very useful until there's an ALTER TABLE equivalent (in 7.3?).

Thanks,
Kevin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message phildobbin 2002-08-02 22:45:05 Re: Postgres and Perl: Which DBI module?
Previous Message Arguile 2002-08-02 22:01:10 Re: Postgres and Perl: Which DBI module?