]> granicus.if.org Git - postgresql/commitdiff
Fix bug in propagating ALTER TABLE actions to typed tables.
authorRobert Haas <rhaas@postgresql.org>
Fri, 8 Apr 2011 19:44:50 +0000 (15:44 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 8 Apr 2011 19:46:13 +0000 (15:46 -0400)
We need to propagate such actions to all typed table children of a
given type, not just the first one.

Noah Misch

src/backend/commands/tablecmds.c

index 4a97819b01f5210c2fd02cd7973db272bdabb51a..bd18db3b831aeff5942b284425bce628cbd4d39d 100644 (file)
@@ -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,