Re: Hooks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hooks
Date: 2016-12-27 18:32:46
Message-ID: 27218.1482863566@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Fetter <david(at)fetter(dot)org> writes:
> One of our hidden treasures is the hook system, documented only in
> random presentations, if you can find them, and in the source code, if
> you know to look.

> I'd like to document the hooks that we consider public APIs.

The main reason we send people to the source code for that is that
it's often not very clear what the extent of a hook's API is. It would
not be terribly useful to document, say, planner_hook just by listing
its arguments and result type. To do anything useful with that hook
requires a pretty extensive understanding of what the planner does,
and you're not going to get that without a willingness to read source.

So I'm a bit suspicious of this project in the first place, but it's
hard to discuss which hooks should be documented when you haven't
defined what you mean by documentation.

Anyway, there aren't any hooks that weren't put in with the expectation
of third-party code using them, so I'm not following your proposed
distinction between public and private hooks.

regards, tom lane

In response to

  • Hooks at 2016-12-27 18:16:28 from David Fetter

Responses

  • Re: Hooks at 2016-12-27 19:43:34 from David Fetter

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-12-27 18:43:26 Re: [patch] psql tab completion for ALTER DEFAULT PRIVILEGES
Previous Message Tom Lane 2016-12-27 18:23:03 Re: BUG: pg_stat_statements query normalization issues with combined queries