1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-29 13:56:47 +03:00

Fix compiler warning and add some more comments

This commit is contained in:
Peter Eisentraut 2017-04-06 11:17:43 -04:00
parent 07044efe00
commit dc0400cc50

View File

@ -5924,6 +5924,11 @@ ATExecAddIdentity(Relation rel, const char *colName,
return address; return address;
} }
/*
* ALTER TABLE ALTER COLUMN SET { GENERATED or sequence options }
*
* Return the address of the affected column.
*/
static ObjectAddress static ObjectAddress
ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmode) ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmode)
{ {
@ -5992,6 +5997,8 @@ ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmod
ObjectAddressSubSet(address, RelationRelationId, ObjectAddressSubSet(address, RelationRelationId,
RelationGetRelid(rel), attnum); RelationGetRelid(rel), attnum);
} }
else
address = InvalidObjectAddress;
heap_freetuple(tuple); heap_freetuple(tuple);
heap_close(attrelation, RowExclusiveLock); heap_close(attrelation, RowExclusiveLock);
@ -5999,6 +6006,11 @@ ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmod
return address; return address;
} }
/*
* ALTER TABLE ALTER COLUMN DROP IDENTITY
*
* Return the address of the affected column.
*/
static ObjectAddress static ObjectAddress
ATExecDropIdentity(Relation rel, const char *colName, bool missing_ok, LOCKMODE lockmode) ATExecDropIdentity(Relation rel, const char *colName, bool missing_ok, LOCKMODE lockmode)
{ {