| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | Amul Sul <sulamul(at)gmail(dot)com> |
| Cc: | Robert Treat <rob(at)xzilla(dot)net>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: alter check constraint enforceability |
| Date: | 2025-12-16 04:55:52 |
| Message-ID: | CACJufxFPcaUz5SyqXXNVaV0BvrhZgHFLugdZa6-jzLCciknbJA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Dec 15, 2025 at 7:49 PM Amul Sul <sulamul(at)gmail(dot)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.
| Attachment | Content-Type | Size |
|---|---|---|
| v6-0001-rename-alter-constraint-enforceability-related-functions.patch | text/x-patch | 10.2 KB |
| v6-0002-Add-support-for-altering-CHECK-constraint-enforceability.patch | text/x-patch | 24.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2025-12-16 05:03:01 | Re: Proposal: Conflict log history table for Logical Replication |
| Previous Message | Xuneng Zhou | 2025-12-16 04:46:27 | Re: Implement waiting for wal lsn replay: reloaded |