Re: let ALTER COLUMN SET DATA TYPE cope with trigger dependency

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: let ALTER COLUMN SET DATA TYPE cope with trigger dependency
Date: 2026-01-22 12:34:18
Message-ID: CACJufxH-Ngr9e7_bT+7d-bFMACqd-efAV3YSgPJyfMp4T9P5AQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

V3 is attached. this should be more neat.
Now it looks very similar to how statistics cope with column data type change.

For statistics, in ATPostAlterTypeParse we will call
transformStatsStmt, we need to do the similar thing for the trigger
WHEN clause.
I introduced transformTriggerStmt and placed it in
src/backend/commands/trigger.c, which should be fine, I think.
It will be invoked from within CreateTriggerFiringOn.

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

Attachment Content-Type Size
v3-0001-let-SET-DATA-TYPE-cope-with-trigger-dependency.patch application/x-patch 42.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-01-22 12:59:31 Re: Assert the timestamp is available for ORIGN_DIFFERS conflicts
Previous Message Fujii Masao 2026-01-22 12:12:18 Re: Flush some statistics within running transactions