Fix ALTER COLUMN TYPE to preserve the tablespace and reloptions of indexes

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 537e92e41f8bd1b3ed56ea1096ceee225fb36923
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-10-13T15:55:40Z
Releases: 8.3.0
Fix ALTER COLUMN TYPE to preserve the tablespace and reloptions of indexes
it affects.  The original coding neglected tablespace entirely (causing
the indexes to move to the database's default tablespace) and for an index
belonging to a UNIQUE or PRIMARY KEY constraint, it would actually try to
assign the parent table's reloptions to the index :-(.  Per bug #3672 and
subsequent investigation.

8.0 and 8.1 did not have reloptions, but the tablespace bug is present.

Files

PathChange+/−
src/backend/utils/adt/ruleutils.c modified +100 −10
src/backend/utils/cache/lsyscache.c modified +30 −1
src/include/utils/lsyscache.h modified +2 −1