pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: postgresql@nowisit.net
To: pgsql-docs@lists.postgresql.org
Subject: Re: Section 40.1 Overview of Event Trigger Behavior, and Table 40.1 missing needed details
Date: Sun, 28 Aug 2022 17:44:45 +0200
Message-ID: <20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql> (raw)
In-Reply-To: <166162658679.1235920.17515770230362718998@wrigleys.postgresql.org>

On 2022-Aug-27, PG Doc comments form wrote:

> Section 40.1. Overview of Event Trigger Behavior says:
> "The table_rewrite event occurs just before a table is rewritten by some
> actions of the commands ALTER TABLE and ALTER TYPE."
> Issue: Neither the section nor the table describe which actions of ALTER
> TABLE. If all actions fire the event trigger then section 40.1 should be
> reworded to not suggest that some actions of ALTER table do not fire the
> event trigger.

I don't follow.  Not all actions fire that event trigger.  Precisely the
point of that event trigger type is to allow you to programmatically
discover which actions do rewrite the table, without having to document
them exactly.  Partly, the reason for this is that some actions can
avoid firing it under specific circumstances -- an example is SET DATA
TYPE, which most of the time does fire it, but it can be skipped in some
cases (say changing varchar(20) to varchar(40)).

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Ellos andaban todos desnudos como su madre los parió, y también las mujeres,
aunque no vi más que una, harto moza, y todos los que yo vi eran todos
mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)





view thread (2+ messages)

Message-ID: <20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql>
Permalink:  ../20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql/
Also on:    postgresql.org/message-id/20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, postgresql@nowisit.net, pgsql-docs@lists.postgresql.org
  Subject: Re: Section 40.1 Overview of Event Trigger Behavior, and Table 40.1 missing needed details
  In-Reply-To: <20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox