Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e3aadb

Browse files
committed
Use TSConfigRelationId in AlterTSConfiguration()
When we are altering a text search configuration, we are getting the tuple from pg_ts_config and using its OID, so use TSConfigRelationId when invoking any post-alter hooks and setting the object address. Further, in the functions called from AlterTSConfiguration(), we're saving information about the command via EventTriggerCollectAlterTSConfig(), so we should be setting commandCollected to true. Also add a regression test to test_ddl_deparse for ALTER TEXT SEARCH CONFIGURATION. Author: Artur Zakirov, a few additional comments by me Discussion: https://www.postgresql.org/message-id/57a71eba-f2c7-e7fd-6fc0-2126ec0b39bd%40postgrespro.ru Back-patch the fix for the InvokeObjectPostAlterHook() call to 9.3 where it was introduced, and the fix for the ObjectAddressSet() call and setting commandCollected to true to 9.5 where those changes to ProcessUtilitySlow() were introduced.
1 parent 603ad8a commit 0e3aadb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/tsearchcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ AlterTSConfiguration(AlterTSConfigurationStmt *stmt)
11861186
/* Update dependencies */
11871187
makeConfigurationDependencies(tup, true, relMap);
11881188

1189-
InvokeObjectPostAlterHook(TSConfigMapRelationId,
1189+
InvokeObjectPostAlterHook(TSConfigRelationId,
11901190
HeapTupleGetOid(tup), 0);
11911191

11921192
heap_close(relMap, RowExclusiveLock);

0 commit comments

Comments
 (0)