git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 1526d4e) | patch
Tighten integrity checks on ALTER TABLE ... ALTER COLUMN ... RENAME.
Mon, 1 Feb 2010 19:28:56 +0000 (19:28 +0000)
Mon, 1 Feb 2010 19:28:56 +0000 (19:28 +0000)
commit 63f9282f6e7a4afed8826437cea6e92d9e4b0869
Tighten integrity checks on ALTER TABLE ... ALTER COLUMN ... RENAME.

When a column is renamed, we recursively rename the same column in
all descendent tables. But if one of those tables also inherits that
column from a table outside the inheritance hierarchy rooted at the
named table, we must throw an error. The previous coding correctly
prohibited the rename when the parent had inherited the column from
elsewhere, but overlooked the case where the parent was OK but a child
table also inherited the same column from a second, unrelated parent.

For now, not backpatched due to lack of complaints from the field.

KaiGai Kohei, with further changes by me.
Reviewed by Bernd Helme and Tom Lane.
src/backend/catalog/pg_inherits.c diff | blob | blame | history
src/backend/commands/alter.c diff | blob | blame | history
src/backend/commands/analyze.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/optimizer/prep/prepunion.c diff | blob | blame | history
src/include/catalog/pg_inherits_fn.h diff | blob | blame | history
src/include/commands/tablecmds.h diff | blob | blame | history
src/test/regress/expected/inherit.out diff | blob | blame | history
src/test/regress/sql/inherit.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /