From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
Cc: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Hooks |
Date: | 2016-12-28 05:14:35 |
Message-ID: | 20161228051435.GA14549@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 27, 2016 at 10:15:55PM -0600, Jim Nasby wrote:
> On 12/27/16 7:41 PM, David Fetter wrote:
> > I see it as larger in scope than mine because it changes how we do
> > things as a project. An example of the kind of thing that this raises
> > is enforcement. Will something (or someone) check that new hooks have
> > this? Will somebody check for comment skew when the APIs change?
> > What happens when somebody forgets?
>
> Can we reduce the scope of this to a manageable starting point?
That is what I'm trying to do.
> I'm guessing that all existing hooks share certain characteristics
> that it'd be pretty easy to detect. If you can detect the hook
> (which I guess means finding a static variable with hook in the
> name) then you can verify that there's an appropriate comment block.
> I'm guessing someone familiar with tools like doxygen could set that
> up without too much effort, and I'd be surprised if the community
> had a problem with it.
Sure, but that seems like an effort somewhat orthogonal to the one I
proposed, which is to get some user-facing i.e. SGML docs up for the
current hooks.
Here's everything that matches ^\w+_hook$ that I've found so far in
git master. There are very likely false positives in this list.
ClientAuthentication_hook
ExecutorCheckPerms_hook
ExecutorEnd_hook
ExecutorFinish_hook
ExecutorRun_hook
ExecutorStart_hook
ExplainOneQuery_hook
ProcessUtility_hook
assign_hook
autocommit_hook
call_bool_check_hook
call_enum_check_hook
call_int_check_hook
call_real_check_hook
call_string_check_hook
check_hook
check_password_hook
comp_keyword_case_hook
create_upper_paths_hook
echo_hidden_hook
echo_hook
emit_log_hook
explain_get_index_name_hook
fetch_count_hook
fixed_paramref_hook
fmgr_hook
get_attavgwidth_hook
get_index_stats_hook
get_relation_info_hook
get_relation_stats_hook
histcontrol_hook
join_search_hook
needs_fmgr_hook
next_client_auth_hook
next_exec_check_perms_hook
object_access_hook
on_error_rollback_hook
on_error_stop_hook
original_client_auth_hook
original_post_parse_analyze_hook
p_coerce_param_hook
p_paramref_hook
p_post_columnref_hook
p_pre_columnref_hook
pgstat_beshutdown_hook
planner_hook
plpgsql_extra_checks_check_hook
plpgsql_extra_errors_assign_hook
plpgsql_extra_warnings_assign_hook
post_parse_analyze_hook
prev_post_parse_analyze_hook
prompt1_hook
prompt2_hook
prompt3_hook
quiet_hook
sepgsql_audit_hook
set_join_pathlist_hook
set_rel_pathlist_hook
shmem_startup_hook
show_context_hook
show_hook
singleline_hook
singlestep_hook
variable_coerce_param_hook
variable_paramref_hook
verbosity_hook
Some appear to be client-side, some server-side. I hope that no hook
is named other than that way, and I'll do my best to check.
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-12-28 05:58:27 | Re: Support for pg_receivexlog --format=plain|tar |
Previous Message | Ideriha, Takeshi | 2016-12-28 04:43:38 | [WIP] RE: DECLARE STATEMENT setting up a connection in ECPG |