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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-10-26 19:39:17 Re: plperl/plperlu interaction
Previous Message Jeff Trout 2006-10-26 19:35:11 Re: plperl/plperlu interaction

Browse pgsql-patches by date

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