Re: Section 40.1 Overview of Event Trigger Behavior, and Table 40.1 missing needed details

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Section 40.1 Overview of Event Trigger Behavior, and Table 40.1 missing needed details
Дата
Msg-id 20220828154445.ad77dfoze2lvcw6m@alvherre.pgsql
обсуждение исходный текст
Ответ на Section 40.1 Overview of Event Trigger Behavior, and Table 40.1 missing needed details  (PG Doc comments form <noreply@postgresql.org>)
Список pgsql-docs
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)



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Handling of quantity in recursive query example
Следующее
От: jian he
Дата:
Сообщение: Re: Does postgres have Equivalent range C range Ty​pe for Built-in SQL range Types