Re: PATCH: Add REINDEX tag to event triggers
От | Jim Jones |
---|---|
Тема | Re: PATCH: Add REINDEX tag to event triggers |
Дата | |
Msg-id | 37cd6187-d6ac-3cfc-a380-8ad1cc6270a0@uni-muenster.de обсуждение исходный текст |
Ответ на | Re: PATCH: Add REINDEX tag to event triggers (Garrett Thornburg <film42@gmail.com>) |
Ответы |
Re: PATCH: Add REINDEX tag to event triggers
|
Список | pgsql-hackers |
Greetings
I added a v2 patch for adding REINDEX to event triggers. The following has changed:1. I fixed the docs to note that ddl_command_start is supported for REINDEX. Thanks, Michael!2. I added Jian He's excellent partition table test and updated the expectations to include that regression test.What is still up for debate:Michael pointed out that REINDEX probably isn't DDL because the docs only specify commands in the standard like CREATE, ALTER, etc. It might be worth creating a new event to trigger on (similar to what was done for table_rewrite) to make a REINDEX trigger fit in a little nicer. Let me know what you think here. Until then, I left the code as `lev = LOGSTMT_DDL` for `T_ReindexStmt`.Thanks,Garrett
Thanks for the patch, Garrett!
I was unable to apply it in 7ef5f5f
$ git apply -v v2-0001-Add-REINDEX-tag-to-event-triggers.patch
Checking patch doc/src/sgml/event-trigger.sgml...
Checking patch src/backend/commands/indexcmds.c...
error: while searching for:
static List *ChooseIndexColumnNames(List *indexElems);
static void ReindexIndex(RangeVar *indexRelation, ReindexParams *params,
bool isTopLevel);
static void RangeVarCallbackForReindexIndex(const RangeVar *relation,
Oid relId, Oid oldRelId, void *arg);
static Oid ReindexTable(RangeVar *relation, ReindexParams *params,
error: patch failed: src/backend/commands/indexcmds.c:94
error: src/backend/commands/indexcmds.c: patch does not apply
Checking patch src/backend/tcop/utility.c...
Checking patch src/include/tcop/cmdtaglist.h...
Checking patch src/test/regress/expected/event_trigger.out...
Hunk #1 succeeded at 556 (offset 2 lines).
Checking patch src/test/regress/sql/event_trigger.sql...
Am I missing something?
Jim
В списке pgsql-hackers по дате отправления: