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