Re: [PATCH] no table rewrite when set column type to constrained domain
solai v <solai.cdac@gmail.com>
From: solai v <solai.cdac@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: Viktor Holmberg <v@viktorh.net>,
Aditya Gollamudi <adigollamudi@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-05-14T09:18:12Z
Lists: pgsql-hackers
Hi, I tested the latest v6 patch on current master with a few different scenarios.For the simple int to constrained-domain type change case,the scan-only patch was used and the relfilenode stayed unchanged before and after ALTER TABLE ,so the rewrite was avoided as expected. I also tried USING expression cases,invalid domain values,and NULL values.The behavior looked correct in those cases as well. I tested with both small tables and a 1M row table. Regards, Solai