Re: Document transition table triggers are not allowed on views/foreign tables

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Document transition table triggers are not allowed on views/foreign tables
Date: 2025-07-26 11:29:19
Message-ID: CAPmGK16WzhDMTSt6oBu4hyAV_4Pv-TJESLLyHB2aK2upMWxGzw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 25, 2025 at 7:59 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> On Fri, Jul 25, 2025 at 3:22 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> > On Thu, Jul 24, 2025 at 12:06 AM Ashutosh Bapat
> > <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> > > On Wed, Jul 23, 2025 at 4:16 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> > > > On Tue, Jul 15, 2025 at 4:55 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
> > > > > Another thing I noticed about transition tables is that while we
> > > > > prohibit transition tables on views/foreign tables, there is no
> > > > > description about that in the user-facing documentation. So I would
> > > > > like to propose to do $SUBJECT in create_trigger.sgml. Attached is a
> > > > > patch for that.
> > >
> > > I think the restriction should be specified in a manner similar to how
> > > restriction on CONSTRAINT option for foreign tables is specified i.e.
> > > in " This option is only allowed for an AFTER trigger that is not a
> > > constraint trigger; also, if the trigger is an UPDATE trigger, it must
> > > not specify a column_name list.". But that sentence is already a bit
> > > complex because of ; also, ... part. How about splitting the sentence
> > > into two and mentioning restriction like below?
> > >
> > > "This option is only allowed for an AFTER trigger on tables other than
> > > views or foreign tables. The trigger should not be a constraint
> > > trigger. If the trigger is an UPDATE trigger, it must not specify a
> > > column_name list when using this option."
> >
> > Good idea! This might be nitpicking, but one thing I noticed is this
> > part of the first sentence: "an AFTER trigger on tables other than
> > views or foreign tables". Like the CONSTRAINT-restrictions
> > description above, how about just saying "an AFTER trigger on a plain
> > table (not a foreign table)"? No need to mention views, so I removed
> > that.
>
> I was actually going to suggest that, but I wasn't sure why you wanted
> to mention "views" explicitly.
>
> > I also changed to singular because that sounds natural. My
> > first language is not English, though. Other than that the change
> > looks good to me.
>
> +1.

Cool! I updated the patch as above. I will push this version.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
Update-documentation-about-transition-tables-v2.patch application/octet-stream 1.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2025-07-26 11:36:10 Re: Fixing memory leaks in postgres_fdw
Previous Message cca5507 2025-07-26 09:27:15 Re: Logical replication launcher did not automatically restart when got SIGKILL