mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-15 08:20:16 +08:00
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 cb1ca4d800
.
Noted by Amit Langote, patch by Etsuro Fujita
This commit is contained in:
parent
d3821e70c9
commit
ad9f08f706
@ -4367,10 +4367,12 @@ ATSimpleRecursion(List **wqueue, Relation rel,
|
|||||||
AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode)
|
AlterTableCmd *cmd, bool recurse, LOCKMODE lockmode)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Propagate to children if desired. Non-table relations never have
|
* Propagate to children if desired. Only plain tables and foreign tables
|
||||||
* children, so no need to search in that case.
|
* 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);
|
Oid relid = RelationGetRelid(rel);
|
||||||
ListCell *child;
|
ListCell *child;
|
||||||
|
Loading…
Reference in New Issue
Block a user