agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Greg Sabino Mullane <htamfids@gmail.com>
Cc: pgsql-docs <pgsql-docs@lists.postgresql.org>
Subject: Re: Table rewrite supporting functions for event triggers
Date: Wed, 11 Sep 2024 15:00:31 +0900
Message-ID: <ZuEx_09-ohYExkJG@paquier.xyz> (raw)
In-Reply-To: <c264f34792b17f5bd30133071cfa252919bf5323.camel@cybertec.at>
References: <CAKAnmmL+Z6j-C8dAx1tVrnBmZJu+BSoc68WSg3sR+CVNjBCqbw@mail.gmail.com>
<718fcf4a067b576b501bd5b18b54a1fdc4fda639.camel@cybertec.at>
<CAKAnmm+SfSEg+bmWqT5Q9BSTU3FGaSquVebrQ+8jg3Dq-_1vxg@mail.gmail.com>
<CAKAnmm+NKVhZMjNN8okbPHXMxSb0Ngqhxgt4hEMGU=RWq9fnKA@mail.gmail.com>
<c264f34792b17f5bd30133071cfa252919bf5323.camel@cybertec.at>
On Tue, Sep 03, 2024 at 09:34:02PM +0200, Laurenz Albe wrote:
> On Tue, 2024-09-03 at 11:54 -0400, Greg Sabino Mullane wrote:
>> How about something like this?
>
> This patch looks good to me.
- Returns a code explaining the reason(s) for rewriting. The exact
- meaning of the codes is release dependent.
+ Returns a code explaining the reason(s) for rewriting. The value is
+ a bitmap built from the following values: 1 (the table has changed
+ persistence), 2 (a column has changed a default value), 4 (a column
+ has a new data type), and 8 (the table access method has changed).
Agreed that the user experience with this function is poor and that
the documentation should be improved. Still, I am not sure that this
is optimal. On top of the values, how about adding the variable names
and also mention that these are defined in event_trigger.h?
Putting the documentation change aside for a bit, could it be better
to redesign this function and return a text value rather than an
integer? We could directly return the names, minus "AT_REWRITE_", for
instance.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../ZuEx_09-ohYExkJG@paquier.xyz/2-signature.asc)
download
view thread (11+ messages) latest in thread
Message-ID: <ZuEx_09-ohYExkJG@paquier.xyz>
Permalink: ../ZuEx_09-ohYExkJG@paquier.xyz/
Also on: postgresql.org/message-id/ZuEx_09-ohYExkJG@paquier.xyz
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: michael@paquier.xyz, laurenz.albe@cybertec.at, htamfids@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: Table rewrite supporting functions for event triggers
In-Reply-To: <ZuEx_09-ohYExkJG@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox