Skip to content

Commit ad9f08f

Browse files
committed
Fix ATSimpleRecursion() to allow recursion from a foreign table.
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 cb1ca4d. Noted by Amit Langote, patch by Etsuro Fujita
1 parent d3821e7 commit ad9f08f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/backend/commands/tablecmds.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4367,10 +4367,12 @@ ATSimpleRecursion(List **wqueue, Relation rel,
43674367
AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode)
43684368
{
43694369
/*
4370-
* Propagate to children if desired. Non-table relations never have
4371-
* children, so no need to search in that case.
4370+
* Propagate to children if desired. Only plain tables and foreign tables
4371+
* have children, so no need to search for other relkinds.
43724372
*/
4373-
if (recurse && rel->rd_rel->relkind == RELKIND_RELATION)
4373+
if (recurse &&
4374+
(rel->rd_rel->relkind == RELKIND_RELATION ||
4375+
rel->rd_rel->relkind == RELKIND_FOREIGN_TABLE))
43744376
{
43754377
Oid relid = RelationGetRelid(rel);
43764378
ListCell *child;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy