From: Ow Mun Heng <Ow.Mun.Heng@wdc.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Mario Weilguni <mweilguni@sime.com>
Cc: Pgsql performance <pgsql-performance@postgresql.org>
Subject: Re: Altering a column type - Most efficient way
Date: Fri, 11 Jul 2008 10:17:00 +0800
Message-ID: <1215742620.853.10.camel@neuromancer.home.net> (raw)
In-Reply-To: <20080710135756.GD3757@alvh.no-ip.org>
References: <1215676380.15319.2.camel@neuromancer.home.net>
<4875C9FA.7020101@sime.com>
<1215682481.15319.14.camel@neuromancer.home.net>
<20080710135756.GD3757@alvh.no-ip.org>
On Thu, 2008-07-10 at 09:57 -0400, Alvaro Herrera wrote:
> Ow Mun Heng wrote:
>
> > This is what I see on the table
> >
> > NEW attypmod = -1
> > OLD attypmod = 8
>
> 8 means varchar(4) which is what you said you had (4+4)
> -1 means unlimited size.
>
This is cool.
If it were this simple a change, I'm not certain why (I believe) PG is
checking each and every row to see if it will fit into the new column
definition/type.
Thus, I'm still a bit hesitant to do the change, although it is
definitely a very enticing thing to do. ( I presume also that this
change will be instantaneous and does not need to check on each and
every row of the table?)
Thanks./
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Ow.Mun.Heng@wdc.com, alvherre@commandprompt.com, mweilguni@sime.com
Subject: Re: Altering a column type - Most efficient way
In-Reply-To: <1215742620.853.10.camel@neuromancer.home.net>
References: <1215676380.15319.2.camel@neuromancer.home.net> <4875C9FA.7020101@sime.com> <1215682481.15319.14.camel@neuromancer.home.net> <20080710135756.GD3757@alvh.no-ip.org> <1215742620.853.10.camel@neuromancer.home.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox