Re: ALTER TABLE & COLUMN - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: ALTER TABLE & COLUMN
Date
Msg-id 20021130033659.GB15558@dcc.uchile.cl
Whole thread Raw
In response to Re: ALTER TABLE & COLUMN  (Neil Conway <neilc@samurai.com>)
List pgsql-general
On Fri, Nov 29, 2002 at 03:22:06PM -0500, Neil Conway wrote:

> Since a lot of data type changes are not obvious (how do you convert the
> data from one type to another, in all cases?), I don't see a real
> problem leaving this in the hands of the admin. The one exception might
> be changing the length limit on a varchar(n) column, but that's such a
> small case I'm not sure it's worth the bother (and can be done by
> hacking the system catalogs anyway).

I agree with you that generally changing datatypes is a task best left
to the DBA, but in case of CHAR/VARCHAR length and probably NUMERIC
length/precision it would be very nice to have some kind of "syntactic
sugar".  Figuring out NUMERIC's atttypmod is not what I'd call trivial,
let alone change it.  Sure, it may be for you, but...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Los dioses no protegen a los insensatos.  Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)

pgsql-general by date:

Previous
From: David Crawshaw
Date:
Subject: Re: FETCH a cursor inside a SELECT
Next
From: Tom Lane
Date:
Subject: Re: Bad timestamp external representation