Content-Length: 270927 | pFad | http://github.com/postgrespro/postgres/commit/ad9f08f70636051b5d5fe8d57062994b7335a960

B2 Fix ATSimpleRecursion() to allow recursion from a foreign table. · postgrespro/postgres@ad9f08f · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/ad9f08f70636051b5d5fe8d57062994b7335a960

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy