diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-10-13 15:55:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-10-13 15:55:49 +0000 |
commit | 5b8328b936f11f8b0cd63428f75754c575ef4dc3 (patch) | |
tree | f2dc8aa876a0b63db6e9f5374e6d686bbd19c6cb /src/include/utils/lsyscache.h | |
parent | ef3ff3eee48d88ce35b87409c0d96a12f75f044b (diff) | |
download | postgresql-5b8328b936f11f8b0cd63428f75754c575ef4dc3.tar.gz postgresql-5b8328b936f11f8b0cd63428f75754c575ef4dc3.zip |
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.
Diffstat (limited to 'src/include/utils/lsyscache.h')
-rw-r--r-- | src/include/utils/lsyscache.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 69eb31bcc55..26dc09b8ada 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.107 2006/10/04 00:30:10 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.107.2.1 2007/10/13 15:55:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -72,6 +72,7 @@ extern char *get_rel_name(Oid relid); extern Oid get_rel_namespace(Oid relid); extern Oid get_rel_type_id(Oid relid); extern char get_rel_relkind(Oid relid); +extern Oid get_rel_tablespace(Oid relid); extern bool get_typisdefined(Oid typid); extern int16 get_typlen(Oid typid); extern bool get_typbyval(Oid typid); |