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

Поиск
Список
Период
Сортировка
От jian he
Тема Re: doc issues in event-trigger-matrix.html
Дата
Msg-id CACJufxEVyCN_UJRxumoL1CKAhAT-akAuz5GKbzWx5PdFcYOGpw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: doc issues in event-trigger-matrix.html  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
On Fri, Mar 22, 2024 at 5:47 AM Peter Eisentraut <peter@eisentraut.org> wrote:
>
> On 19.03.24 10:34, Daniel Gustafsson wrote:
> >>> "Only for local objects"
> >>> is there any reference explaining "local objects"?
> >>> I think local object means objects that only affect one single database?
> > That's a bigger problem than the table representation, we never define what
> > "local object" mean anywhere in the EVT docs.  EV's are global for a database,
> > but not a cluster, so I assume what this means is that EVs for non-DDL commands
> > like COMMENT can only fire for a specific relation they are attached to and not
> > database wide?
>
> I think we could replace this whole table by a few definitions:
>
> - "Local objects" are everything except "global objects".
>
> - "Global objects", for the purpose of event triggers, are databases,
> tablespaces, roles, role memberships, and parameter ACLs.
>
> - DDL commands are all commands except SELECT, INSERT, UPDATE, DELETE,
> MERGE.
>
> - Events triggers are supported for all DDL commands on all local objects.
>
> Is this table saying anything else?
>
> Is there any way to check if it's even correct?  For example, it shows

comparing  these two html files:
https://www.postgresql.org/docs/devel/sql-commands.html
https://www.postgresql.org/docs/devel/event-trigger-matrix.html

summary:
all commands begin with "CREATE"
except the following two are not supported  by event trigger.
CREATE TRANSFORM
CREATE EVENT TRIGGER

generally, one "CREATE" corresponds to one "DROP" and one "ALTER".
but I found there is more to "CREATE" than  "ALTER".  (i didn't bother why)
there is one more "DROP" than "CREATE",
because of "DROP ROUTINE" and "DROP OWNED"
also
"CREATE TABLE"
"CREATE TABLE AS"
corresponds to one "DROP TABLE"

other command not begin with "CREATE" supported by event trigger (per
event-trigger-matrix) are:
COMMENT
GRANT Only for local objects
IMPORT FOREIGN SCHEMA
REFRESH MATERIALIZED VIEW
REINDEX
REVOKE
SECURITY LABEL
SELECT INTO

all commands
that is not begin with "CREATE" | "DROP", "ALTER" (per sql-commands.html) are:
ABORT
ANALYZE
BEGIN
CALL
CHECKPOINT
CLOSE
CLUSTER
COMMENT
COMMIT
COMMIT PREPARED
COPY
DEALLOCATE
DECLARE
DELETE
DISCARD
DO
END
EXECUTE
EXPLAIN
FETCH
GRANT
IMPORT FOREIGN SCHEMA
INSERT
LISTEN
LOAD
LOCK
MERGE
MOVE
NOTIFY
PREPARE
PREPARE TRANSACTION
REASSIGN OWNED
REFRESH MATERIALIZED VIEW
REINDEX
RELEASE SAVEPOINT
RESET
REVOKE
ROLLBACK
ROLLBACK PREPARED
ROLLBACK TO SAVEPOINT
SAVEPOINT
SECURITY LABEL
SELECT
SELECT INTO
SET
SET CONSTRAINTS
SET ROLE
SET SESSION AUTHORIZATION
SET TRANSACTION
SHOW
START TRANSACTION
TRUNCATE
UNLISTEN
UPDATE
VACUUM
VALUES



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: speed up a logical replica setup
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: speed up a logical replica setup