Re: Hooks Docu - list of hooks - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: Hooks Docu - list of hooks
Date
Msg-id 20140624105946.GM31357@toroid.org
Whole thread Raw
In response to Hooks Docu - list of hooks  (geohas <lists@hasibether.at>)
Responses Re: Hooks Docu - list of hooks
List pgsql-hackers
At 2014-06-24 12:49:17 +0200, lists@hasibether.at wrote:
>
> Is there a list of possible hooks, or maybe a little docu or overview?

The best I found was "git grep _hook_type" and then read the code to
understand when and why the hook was called.

> Especially hooks to catch Insert, Update and Delete Stmts and
> SubQuerys.
> 
> It would help a lot to finish / write a log into Tables Module.

Look at how pgaudit does it: https://github.com/2ndQuadrant/pgaudit

The code has comments about how the various available hooks are used.
(I was planning to implement a bgwriter that wrote log messages to a
table, which sounds a bit like what you want to do.)

-- Abhijit



pgsql-hackers by date:

Previous
From: "MauMau"
Date:
Subject: Re: PostgreSQL in Windows console and Ctrl-C
Next
From: geohas
Date:
Subject: Re: Hooks Docu - list of hooks