Re: Table rewrite supporting functions for event triggers - Mailing list pgsql-docs

From Greg Sabino Mullane
Subject Re: Table rewrite supporting functions for event triggers
Date
Msg-id CAKAnmm+SfSEg+bmWqT5Q9BSTU3FGaSquVebrQ+8jg3Dq-_1vxg@mail.gmail.com
Whole thread Raw
In response to Re: Table rewrite supporting functions for event triggers  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-docs
On Mon, Sep 2, 2024 at 9:57 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
I think that it would be better to add a reference to
https://www.postgresql.org/docs/16/functions-event-triggers.html#FUNCTIONS-EVENT-TRIGGER-TABLE-REWRITE
than to repeat that information.

If you feel that "The exact meaning of the codes is release dependent" is unnecessarily
vague, that sentence should be changed.

Okay, that's a good point, will do so in the next patch.

A "bitmap of reasons" to me would mean that each reason is a bit, and if two reasons
apply at the same time, both bits are set.  But that's clearly not what you mean, because
"a column has a new data type" is not the same as "the table has changed persistence"
and at the same time "a column has changed a default value".

Perhaps "a bitmap of reasons" should simply become "the reason".

No, it really is a bitmap, as you can get a reason of "5" for example, if you change the persistence and a data type in the same ALTER TABLE command, e.g. alter table foo set unlogged, alter id type bigint; But I wrote it wrong: they should be 1,2,4,8.

Cheers,
Greg



pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Table rewrite supporting functions for event triggers
Next
From: Laurenz Albe
Date:
Subject: Re: Table rewrite supporting functions for event triggers