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

Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: "tigran(dot)mkrtchyan" <tigran(dot)mkrtchyan(at)desy(dot)de>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches
Date: 2012-08-23 17:55:12
Message-ID: 1600.1345744512@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> So the ALTER TABLE trick is not needed in 9.0, but is useful in previous
> releases.  There are optimizations to avoid the table rewrite in certain
> cases in 9.2:
> http://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.2#Reduce_ALTER_TABLE_rewrites

> According to that page, though, a change of varchar(36) to varchar(36)
> would still require a table rewrite, which doesn't make sense to me.  Is
> the wiki page inaccurate maybe?

Yeah - you can easily convince yourself by timing it that no rewrite
happens in 9.2.

			regards, tom lane


In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2012-08-23 19:45:46
Subject: Re: BUG #6728: revoke grant cascade behaviour
Previous:From: Jeff DavisDate: 2012-08-23 16:45:25
Subject: Re: BUG #7501: Unique index fails to check uniqueness on nulls

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