aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 7b7b09baaa8..13156391241 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -941,10 +941,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
* while raw defaults go into a list of RawColumnDefault structs that will
* be processed by AddRelationNewConstraints. (We can't deal with raw
* expressions until we can do transformExpr.)
- *
- * We can set the atthasdef flags now in the tuple descriptor; this just
- * saves StoreAttrDefault from having to do an immediate update of the
- * pg_attribute rows.
*/
rawDefaults = NIL;
cookedDefaults = NIL;
@@ -953,11 +949,8 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
foreach(listptr, stmt->tableElts)
{
ColumnDef *colDef = lfirst(listptr);
- Form_pg_attribute attr;
attnum++;
- attr = TupleDescAttr(descriptor, attnum - 1);
-
if (colDef->raw_default != NULL)
{
RawColumnDefault *rawEnt;
@@ -969,7 +962,6 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
rawEnt->raw_default = colDef->raw_default;
rawEnt->generated = colDef->generated;
rawDefaults = lappend(rawDefaults, rawEnt);
- attr->atthasdef = true;
}
else if (colDef->cooked_default != NULL)
{
@@ -987,10 +979,7 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
cooked->inhcount = 0; /* ditto */
cooked->is_no_inherit = false;
cookedDefaults = lappend(cookedDefaults, cooked);
- attr->atthasdef = true;
}
-
- populate_compact_attribute(descriptor, attnum - 1);
}
/*
@@ -7363,8 +7352,7 @@ ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel,
* and the later subcommands had been issued in new ALTER TABLE commands.
*
* We can skip this entirely for relations without storage, since Phase 3
- * is certainly not going to touch them. System attributes don't have
- * interesting defaults, either.
+ * is certainly not going to touch them.
*/
if (RELKIND_HAS_STORAGE(relkind))
{