diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-06 11:17:43 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-04-06 11:18:13 -0400 |
commit | dc0400cc501ebe839c15a387911945d1585e4787 (patch) | |
tree | cb4c0988c667c92c253d611f14cff7c2603937d7 /src/backend/commands/tablecmds.c | |
parent | 07044efe00762bdd04c4d392adb8f6425b13369b (diff) | |
download | postgresql-dc0400cc501ebe839c15a387911945d1585e4787.tar.gz postgresql-dc0400cc501ebe839c15a387911945d1585e4787.zip |
Fix compiler warning and add some more comments
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 49a73707bca..60f8b7f26c5 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -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) { @@ -5992,6 +5997,8 @@ 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); @@ -5999,6 +6006,11 @@ ATExecSetIdentity(Relation rel, const char *colName, Node *def, LOCKMODE lockmod 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) { |