Re: [PATCH] no table rewrite when set column type to constrained domain - Mailing list pgsql-hackers

From jian he
Subject Re: [PATCH] no table rewrite when set column type to constrained domain
Date
Msg-id CACJufxEwb8sViRHJ0zVTAo99R0avc9sW0tkysmHp7v5LT7F0yg@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] no table rewrite when set column type to constrained domain  (Viktor Holmberg <v@viktorh.net>)
Responses Re: [PATCH] no table rewrite when set column type to constrained domain
List pgsql-hackers
On Tue, Mar 24, 2026 at 12:18 AM Viktor Holmberg <v@viktorh.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.

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

Attachment

pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: Fix "could not find memoization table entry"
Next
From: Masahiko Sawada
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions