Re: doc issues in event-trigger-matrix.html

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: doc issues in event-trigger-matrix.html
Date: 2024-10-30 12:31:36
Message-ID: CACJufxEtUZJccBQjrO5kLS2KO3y_J4aGk9RdYzCvk4+hy0ZKgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 29, 2024 at 7:54 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> I made a patch for this. I have expanded the narrative discussion on
> what commands are supported for event triggers, also made a few
> corrections/additions there, based on inspecting the source code. And
> then removed the big matrix, which doesn't provide any additional
> information, I think.
>
> I think this is sufficient and covers everything. The only hand-wavy
> thing I can see is exactly which ALTER commands trigger the sql_drop
> event. But this was already quite imprecise before, and I think also
> not quite correct. This might need a separate investigation.
>
> In any case, we can use this as a starting point to iterate on the right
> wording etc.

hi. I have some minor issue.

<para>
An event trigger fires whenever the event with which it is associated
occurs in the database in which it is defined.
</para>
is possible to rewrite this sentence, two "which" is kind of not easy
to understand?

create role alice;
create role bob;
grant alice to bob;
<para>
As an exception, this event does not occur for DDL commands targeting
shared objects:
<itemizedlist>
<listitem><para>databases</para></listitem>
<listitem><para>roles</para></listitem>
<listitem><para>tablespaces</para></listitem>
<listitem><para>parameter privileges</para></listitem>
<listitem><para><command>ALTER SYSTEM</command></para></listitem>
</itemizedlist>
This event also does not occur for commands targeting event triggers
themselves.
</para>

not 100% sure this description
" <listitem><para>roles</para></listitem>"
cover case like "grant alice to bob;"
Here "targeting shared objects" is "role related meta information".
maybe a new item like
<listitem><para>roles privileges</para></listitem>.

so we can more easily distinguish
"grant select on t1 to alice;"
and
"grant alice to bob;"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rafia Sabih 2024-10-30 12:32:32 Re: Forbid to DROP temp tables of other sessions
Previous Message Heikki Linnakangas 2024-10-30 12:16:51 Re: AIO writes vs hint bits vs checksums