git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d3821e7)
Fix ATSimpleRecursion() to allow recursion from a foreign table.
2015年4月28日 19:25:00 +0000 (12:25 -0700)
2015年4月28日 19:25:00 +0000 (12:25 -0700)
This is necessary in view of the changes to allow foreign tables to be
full members of inheritance hierarchies, but I (tgl) unaccountably missed
it in commit cb1ca4d800621dcae67ca6c799006de99fa4f0a5.

Noted by Amit Langote, patch by Etsuro Fujita


diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index bedd8aeb782fa1c6b71e7e6e45773fe82c77f164..5d842857523d5f52e8b10fd93cf6d2dc887c0cf9 100644 (file)
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -4367,10 +4367,12 @@ ATSimpleRecursion(List **wqueue, Relation rel,
AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode)
{
/*
- * Propagate to children if desired. Non-table relations never have
- * children, so no need to search in that case.
+ * Propagate to children if desired. Only plain tables and foreign tables
+ * have children, so no need to search for other relkinds.
*/
- if (recurse && rel->rd_rel->relkind == RELKIND_RELATION)
+ if (recurse &&
+ (rel->rd_rel->relkind == RELKIND_RELATION ||
+ rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE))
{
Oid relid = RelationGetRelid(rel);
ListCell *child;
This is the main PostgreSQL git repository.
RSS Atom

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