Re: CREATE TABLE LIKE INCLUDING TRIGGERS - Mailing list pgsql-hackers

From jian he
Subject Re: CREATE TABLE LIKE INCLUDING TRIGGERS
Date
Msg-id CACJufxGGXnRP+Em521KvPVOmnPtya2zpPqrTuYDmrSY=AFVmfw@mail.gmail.com
Whole thread Raw
In response to Re: CREATE TABLE LIKE INCLUDING TRIGGERS  (Zsolt Parragi <zsolt.parragi@percona.com>)
Responses Re: CREATE TABLE LIKE INCLUDING TRIGGERS
List pgsql-hackers
On Wed, Jan 21, 2026 at 8:13 PM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
>
> Hello!
>
> I tested the patch, it works as described, but I did notice one possible issue:
>
> Shouldn't this preserve the enabled state of the triggers, or if it
> doesn't, should the documentation include this limitations?
>

I intended to document it as
         <para>
          All non-internal triggers on the original table will be
created on the new table.
          By default, these triggers fire in "origin" and "local" modes. Refer
          to <link linkend="sql-altertable"><command>ALTER
TABLE</command></link>
          to modify the firing condition.
         </para>

what do you think?


--
jian
https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Avoid recalculating pgprocno in ProcArrayAdd()
Next
From: Andrey Borodin
Date:
Subject: Re: Likely undefined behavior with some flexible arrays