File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.85 2000/07/05 13:22:23 wieck Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.86 2000/07/05 13:50:59 wieck Exp $
12
12
*
13
13
* NOTES
14
14
* The PerformAddAttribute() code, like most of the relation
@@ -340,13 +340,17 @@ AlterTableAddColumn(const char *relationName,
340
340
foreach (child , children )
341
341
{
342
342
Oid childrelid = lfirsti (child );
343
+ char * childrelname ;
343
344
344
345
if (childrelid == myrelid )
345
346
continue ;
346
347
rel = heap_open (childrelid , AccessExclusiveLock );
347
- AlterTableAddColumn (RelationGetRelationName (rel ),
348
- false, colDef );
348
+ childrelname = pstrdup (RelationGetRelationName (rel ));
349
349
heap_close (rel , AccessExclusiveLock );
350
+
351
+ AlterTableAddColumn (childrelname , false, colDef );
352
+
353
+ pfree (childrelname );
350
354
}
351
355
}
352
356
}
You can’t perform that action at this time.
0 commit comments