diff options
author | Robert Haas <rhaas@postgresql.org> | 2012-12-29 07:55:37 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2012-12-29 07:55:37 -0500 |
commit | 82b1b213cad3a69cf5f3dfaa81687c14366960fc (patch) | |
tree | e19129f124c02d7ef274393d584de97cc18a5f66 /src/backend/commands/tsearchcmds.c | |
parent | 5ab3af46ddd2f2c2b248f1ffdb688b394d4bb387 (diff) | |
download | postgresql-82b1b213cad3a69cf5f3dfaa81687c14366960fc.tar.gz postgresql-82b1b213cad3a69cf5f3dfaa81687c14366960fc.zip |
Adjust more backend functions to return OID rather than void.
This is again intended to support extensions to the event trigger
functionality. This may go a bit further than we need for that
purpose, but there's some value in being consistent, and the OID
may be useful for other purposes also.
Dimitri Fontaine
Diffstat (limited to 'src/backend/commands/tsearchcmds.c')
-rw-r--r-- | src/backend/commands/tsearchcmds.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index b922c6ed476..61eda19ecb4 100644 --- a/src/backend/commands/tsearchcmds.c +++ b/src/backend/commands/tsearchcmds.c @@ -614,7 +614,7 @@ RemoveTSDictionaryById(Oid dictId) /* * ALTER TEXT SEARCH DICTIONARY */ -void +Oid AlterTSDictionary(AlterTSDictionaryStmt *stmt) { HeapTuple tup, @@ -722,6 +722,8 @@ AlterTSDictionary(AlterTSDictionaryStmt *stmt) ReleaseSysCache(tup); heap_close(rel, RowExclusiveLock); + + return dictId; } /* ---------------------- TS Template commands -----------------------*/ @@ -1349,10 +1351,11 @@ RemoveTSConfigurationById(Oid cfgId) /* * ALTER TEXT SEARCH CONFIGURATION - main entry point */ -void +Oid AlterTSConfiguration(AlterTSConfigurationStmt *stmt) { HeapTuple tup; + Oid cfgId; Relation relMap; /* Find the configuration */ @@ -1363,6 +1366,8 @@ AlterTSConfiguration(AlterTSConfigurationStmt *stmt) errmsg("text search configuration \"%s\" does not exist", NameListToString(stmt->cfgname)))); + cfgId = HeapTupleGetOid(tup); + /* must be owner */ if (!pg_ts_config_ownercheck(HeapTupleGetOid(tup), GetUserId())) aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_TSCONFIGURATION, @@ -1382,6 +1387,8 @@ AlterTSConfiguration(AlterTSConfigurationStmt *stmt) heap_close(relMap, RowExclusiveLock); ReleaseSysCache(tup); + + return cfgId; } /* |