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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 1ab9faa) | patch
Retain comments on indexes and constraints at ALTER TABLE ... TYPE ...
2015年7月14日 08:40:22 +0000 (11:40 +0300)
2015年7月14日 08:40:22 +0000 (11:40 +0300)
commit e42375fc8124e99c33fa330c53c2b4b502fa0baf
Retain comments on indexes and constraints at ALTER TABLE ... TYPE ...

When a column's datatype is changed, ATExecAlterColumnType() rebuilds all
the affected indexes and constraints, and the comments from the old
indexes/constraints were not carried over.

To fix, create a synthetic COMMENT ON command in the work queue, to re-add
any comments on constraints. For indexes, there's a comment field in
IndexStmt that is used.

This fixes bug #13126, reported by Kirill Simonov. Original patch by
Michael Paquier, reviewed by Petr Jelinek and me. This bug is present in
all versions, but only backpatch to 9.5. Given how minor the issue is, it
doesn't seem worth the work and risk to backpatch further than that.
src/backend/commands/tablecmds.c diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/test/regress/expected/alter_table.out diff | blob | blame | history
src/test/regress/sql/alter_table.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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