Skip to content

Commit

Permalink
Fix compiler warning and add some more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
petere committed Apr 6, 2017
1 parent 07044ef commit dc0400c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/backend/commands/tablecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -5924,6 +5924,11 @@ ATExecAddIdentity(Relation rel, const char *colName,
return address;
}

/*
* ALTER TABLE ALTER COLUMN SET { GENERATED or sequence options }
*
* Return the address of the affected column.
*/
static ObjectAddress
ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmode)
{
Expand Down Expand Up @@ -5992,13 +5997,20 @@ ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmod
ObjectAddressSubSet(address, RelationRelationId,
RelationGetRelid(rel), attnum);
}
else
address = InvalidObjectAddress;

heap_freetuple(tuple);
heap_close(attrelation, RowExclusiveLock);

return address;
}

/*
* ALTER TABLE ALTER COLUMN DROP IDENTITY
*
* Return the address of the affected column.
*/
static ObjectAddress
ATExecDropIdentity(Relation rel, const char *colName, bool missing_ok, LOCKMODE lockmode)
{
Expand Down

0 comments on commit dc0400c

Please sign in to comment.