Re: Table rewrite supporting functions for event triggers

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Table rewrite supporting functions for event triggers
Date: 2024-09-03 15:10:57
Message-ID: CAKAnmm+SfSEg+bmWqT5Q9BSTU3FGaSquVebrQ+8jg3Dq-_1vxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Sep 2, 2024 at 9:57 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Greg Sabino Mullane 2024-09-03 15:54:54 Re: Table rewrite supporting functions for event triggers
Previous Message Laurenz Albe 2024-09-03 01:57:19 Re: Table rewrite supporting functions for event triggers