Skip site navigation (1) Skip section navigation (2)

Re: Eliminating phase 3 requirement for varlen increases via ALTER COLUMN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Eliminating phase 3 requirement for varlen increases via ALTER COLUMN
Date: 2006-10-26 19:37:51
Message-ID: 24363.1161891471@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com> writes:
> The attached patch handles the simple case where a user wants to
> increase the user-defined storage size of a variable length object,
> such as VARCHAR or NUMERIC, without having to rebuild the table.

This makes some really quite unacceptable assumptions about the meaning
and encoding of typmod; in fact I don't believe it's even correct for
NUMERIC, which uses a two-field encoding in typmod.  NUMERIC(18,2) to
NUMERIC(20,0) cannot be a work-free conversion.  Given the plans to
allow user-defined types to have their own interpretation of typmod,
you can't just blithely assume you know the semantics of a typmod change.

I'm also wondering what's the point of comparing attbyval etc when
you've already checked it's the same type OID.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2006-10-26 19:39:17
Subject: Re: plperl/plperlu interaction
Previous:From: Jeff TroutDate: 2006-10-26 19:35:11
Subject: Re: plperl/plperlu interaction

pgsql-patches by date

Next:From: Jonah H. HarrisDate: 2006-10-26 19:48:54
Subject: Re: Eliminating phase 3 requirement for varlen increases via ALTER COLUMN
Previous:From: Tom LaneDate: 2006-10-26 18:32:07
Subject: Re: GUC description cleanup

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