Re: enable/disable broken for statement triggers on partitioned tables

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Subject: Re: enable/disable broken for statement triggers on partitioned tables
Date: 2022-07-29 18:44:52
Message-ID: 20220729184452.2i4xcru3lzey76m6@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-May-24, Amit Langote wrote:

> So, I think we should do something like the attached. A lot of
> boilerplate is needed given that the various enable/disable trigger
> variants are represented as separate sub-commands (AlterTableCmd
> subtypes), which can perhaps be avoided by inventing a
> EnableDisableTrigStmt sub-command node that stores (only?) the recurse
> flag.

Yeah, I don't know about adding tons of values to that enum just so that
we can use that to hide a boolean inside. Why not add a boolean to the
containing struct? Something like the attached.

We can later use the same thing to undo what happens in in AddColumn,
DropColumn, etc. It all looks pretty strange and confusing to me.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"Investigación es lo que hago cuando no sé lo que estoy haciendo"
(Wernher von Braun)

Attachment Content-Type Size
triggers-recurse.patch text/x-diff 10.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-07-29 18:47:59 Re: Documentation about PL transforms
Previous Message Robert Haas 2022-07-29 18:41:29 Re: making relfilenodes 56 bits