From 82b1b213cad3a69cf5f3dfaa81687c14366960fc Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Sat, 29 Dec 2012 07:55:37 -0500 Subject: 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 --- src/backend/commands/tsearchcmds.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/tsearchcmds.c') 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; } /* -- cgit v1.2.3