Truncate statement-level trigger behaviour

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: pensnarik(at)gmail(dot)com
Subject: Truncate statement-level trigger behaviour
Date: 2019-08-27 08:55:29
Message-ID: 156689612954.1127.4206178294202728291@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/trigger-definition.html
Description:

Hello,

documentation
(https://www.postgresql.org/account/comments/new/10/trigger-definition.html/)
says:

"A statement that targets a parent table in an inheritance or partitioning
hierarchy does not cause the statement-level triggers of affected child
tables to be fired; only the parent table's statement-level triggers are
fired."

However, I noticed that statement-level TRUNCATE triggers are fired both for
parent table and its partitions. Is the documentation inconsistent with the
actual PostgreSQL behaviour or I missed something? I made some tests and
checked PostgreSQL source code as well (ExecuteTruncate() function) and it
seems that there is some inconsistency.

Thank you.

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2019-08-27 22:04:53 Re: doc: clarify "pg_signal_backend" default role
Previous Message Tom Lane 2019-08-23 04:21:08 Re: minor doc fixes for REL_12_STABLE