Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches
Date
Msg-id 1600.1345744512@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #7502: ALTER COLUMN TYPE processed even if column type matches  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.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

pgsql-bugs by date:

Previous
From: Jeff Davis
Date:
Subject: Re: BUG #7501: Unique index fails to check uniqueness on nulls
Next
From: Tom Lane
Date:
Subject: Re: BUG #6728: revoke grant cascade behaviour