| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | Viktor Holmberg <v(at)viktorh(dot)net> |
| Cc: | Aditya Gollamudi <adigollamudi(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] no table rewrite when set column type to constrained domain |
| Date: | 2026-03-24 01:16:47 |
| Message-ID: | CACJufxEwb8sViRHJ0zVTAo99R0avc9sW0tkysmHp7v5LT7F0yg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Mar 24, 2026 at 12:18 AM Viktor Holmberg <v(at)viktorh(dot)net> wrote:
>
> This appears to address some of my comments but not this one?
>
> CREATE DOMAIN domain1 AS INT CHECK(VALUE > 1) NOT NULL;
> CREATE TABLE t_const_using(a INT);
> INSERT INTO t_const_using VALUES(-2);
> ALTER TABLE t_const_using ALTER COLUMN a SET DATA TYPE domain1 USING 5;
> SELECT a FROM t_const_using; -- should be 5 after rewrite, not -2
> a
> ----
> -2
Sure, these tests are added to v6.
| Attachment | Content-Type | Size |
|---|---|---|
| v6-0001-Skipping-table-rewrites-for-changing-column-types-in-some-cases.patch | text/x-patch | 15.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-03-24 01:17:24 | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Previous Message | Tender Wang | 2026-03-24 01:10:07 | Re: Fix "could not find memoization table entry" |