agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Greg Sabino Mullane <htamfids@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-docs <pgsql-docs@lists.postgresql.org>
Subject: Re: Table rewrite supporting functions for event triggers
Date: Thu, 12 Sep 2024 12:17:28 +0900
Message-ID: <ZuJdSA9U5OmgagbS@paquier.xyz> (raw)
In-Reply-To: <CAKAnmmJ-DXh4QDjS8Aiz8SBxDWrcj1Epq54byb8T_035nTX2JQ@mail.gmail.com>
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>
	<ZuEx_09-ohYExkJG@paquier.xyz>
	<CAKAnmmJ-DXh4QDjS8Aiz8SBxDWrcj1Epq54byb8T_035nTX2JQ@mail.gmail.com>

On Wed, Sep 11, 2024 at 10:14:27AM -0400, Greg Sabino Mullane wrote:
>  I dunno - so would we smush them together and return something like:
> 
> "ALTER_PERSISTENCE and COLUMN_REWRITE"

If multiple are set, let's just make it text[], then.

> That would be a step backwards for anyone possibly using that integer
> programatically to (for example) give a pretty user-facing message about
> why the event was triggered.

I don't know either how much people are relying on these numbers in
applications.  If this is like what we do in the regression tests and
print it in notice messages within a PL/pgSQL function, that's not
going to matter.

Or just have a separate function..

Do you have a comment about mentioning the variables or the header in
the docs for the stable branches?  I'm aware that this is a rare
practice, but so is this function's design.  My argument is
greppability between the code and the docs, mainly, to not miss an
update of the docs if more reasons are added.  That would be unlikely,
but a backpatch of a reason is not impossible ABI-wise.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../ZuJdSA9U5OmgagbS@paquier.xyz/2-signature.asc)
  download

view thread (11+ messages)  latest in thread

Message-ID: <ZuJdSA9U5OmgagbS@paquier.xyz>
Permalink:  ../ZuJdSA9U5OmgagbS@paquier.xyz/
Also on:    postgresql.org/message-id/ZuJdSA9U5OmgagbS@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, htamfids@gmail.com, laurenz.albe@cybertec.at, pgsql-docs@lists.postgresql.org
  Subject: Re: Table rewrite supporting functions for event triggers
  In-Reply-To: <ZuJdSA9U5OmgagbS@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