Re: Hooks Docu - list of hooks

From: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
To: geohas <lists(at)hasibether(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hooks Docu - list of hooks
Date: 2014-06-24 10:59:46
Message-ID: 20140624105946.GM31357@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2014-06-24 12:49:17 +0200, lists(at)hasibether(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2014-06-24 11:03:27 Re: PostgreSQL in Windows console and Ctrl-C
Previous Message Andres Freund 2014-06-24 10:57:02 Re: Add a filed to PageHeaderData