Re: using index to speedup add not null constraints to a table

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: using index to speedup add not null constraints to a table
Date: 2025-04-28 04:36:14
Message-ID: CACJufxHdR0Rd4-v78XhH+xNungof=zQrcTZK0GSN16zoNHWdHg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 18, 2025 at 4:07 PM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>
> I don't have any good ideas to do the regress tests.
> I use
> ereport(NOTICE,
> errmsg("all not-null constraints on relation
> \"%s\" are validated by index scan",
> RelationGetRelationName(oldrel)));
> to do the tests.
>
for tests, just found out i can imitate
src/test/modules/test_misc/t/001_constraint_validation.pl,

So I created a file:
src/test/modules/test_misc/t/008_indexscan_validate_notnull.pl
for TAP tests.

Attachment Content-Type Size
v5-0001-using-indexscan-to-speedup-add-not-null-constraints.patch text/x-patch 27.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2025-04-28 06:16:19 Re: Cancel problems of query to pg_stat_statements
Previous Message jian he 2025-04-28 02:45:13 domain over virtual generated column