Re: alter check constraint enforceability

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Amul Sul <sulamul@gmail.com>
Cc: Robert Treat <rob@xzilla.net>, Kirill Reshke <reshkekirill@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-12-16T04:55:52Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add support for altering CHECK constraint enforceability

  2. rename alter constraint enforceability related functions

Attachments

On Mon, Dec 15, 2025 at 7:49 PM Amul Sul <sulamul@gmail.com> wrote:
>
> > v5-0002: alter check constraint enforceability
> >
> The patch also looks good, but I have a minor comment for the test --
> you created the check_constraint_status view, which is not dropped, it
> should be dropped at the end. Also, instead of a view, I think you
> could use the \set psql-meta-command; for example, see the
> init_range_parted or show_data tests in update.sql
>
> Also, run pgindent on both patches.
>

i have tried using \set, but it seems to require the query within a single line.
since the view check_constraint_status definition is quite longer, \set would
make it less readable, so I choose to use view.

previously I use
+ newcon = (NewConstraint *) palloc0(sizeof(NewConstraint));
now use
+        newcon = palloc0_object(NewConstraint);

v6-0001, v6-0002 both indented properly via pgindent, also polished the commit
messages.



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