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

Browse pgsql-bugs by date

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