From: Robert Haas Date: Fri, 8 Apr 2011 19:44:50 +0000 (-0400) Subject: Fix bug in propagating ALTER TABLE actions to typed tables. X-Git-Tag: REL9_1_BETA1~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0bd155cbf2543cdead70b6e6390e9260035e1468;p=postgresql Fix bug in propagating ALTER TABLE actions to typed tables. We need to propagate such actions to all typed table children of a given type, not just the first one. Noah Misch --- diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 4a97819b01..bd18db3b83 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -4014,7 +4014,7 @@ find_typed_table_dependencies(Oid typeOid, const char *typeName, DropBehavior be scan = heap_beginscan(classRel, SnapshotNow, 1, key); - if (HeapTupleIsValid(tuple = heap_getnext(scan, ForwardScanDirection))) + while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL) { if (behavior == DROP_RESTRICT) ereport(ERROR,