can i pass the transition tables to any function from hooks like ExecutorFinish?

From: Onur ALTUN <onuraltun(at)hotmail(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: can i pass the transition tables to any function from hooks like ExecutorFinish?
Date: 2020-03-12 10:54:28
Message-ID: MN2PR01MB5342DCCA124900C8042A6065ABFD0@MN2PR01MB5342.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

i want to audit dml changes to my audit table and i dont want to use trigger. i am trying to pass the transition table data to my function. (or another solution) i want to write an extension and my code is like above.

if (queryDesc->operation == CMD_INSERT) {
SPI_connect();

Oid argtypes[1] = { REGTYPEOID }; **//whatever**

SPI_execute_with_args("SELECT save_insert($1)", 1, argtypes, queryDesc->estate->es_tupleTable, NULL, true, 0);

SPI_finish();
}

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-03-12 11:57:59 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Previous Message Julien Rouhaud 2020-03-12 10:31:15 Re: Planning counters in pg_stat_statements (using pgss_store)