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

2025-04-28 Thread Álvaro Herrera
On 2025-Apr-28, jian he wrote: > 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. Seems reasonable, didn't look at it in detail. I think

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

2025-04-27 Thread jian he
On Fri, Apr 18, 2025 at 4:07 PM jian he 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", > Relation

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

2025-04-18 Thread jian he
On Wed, Feb 5, 2025 at 4:24 PM jian he wrote: > > rebased new patch attached. > I also did some cosmetic changes. comments refined. > make sure using index_scan mechanism to fast check column not-null can > only be used via btree index. > isolation tests are simplified. I realized that my previou

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

2025-02-05 Thread jian he
hi rebased new patch attached. I also did some cosmetic changes. comments refined. make sure using index_scan mechanism to fast check column not-null can only be used via btree index. isolation tests are simplified. From be8fea79986339cadff21dbe9c4415b330a296a3 Mon Sep 17 00:00:00 2001 From: jian

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

2024-12-31 Thread jian he
hi. In v1 I didn't do the `git add` for newly created isolation test related files. so the cfbot for isolation tests failed. v1 with index: create index t_idx_ab on t(a,b); we cannot fast add a not-null constraint for column b. with the attached v2 patch, now we can do that. v2, isolation test a

using index to speedup add not null constraints to a table

2024-12-15 Thread jian he
hi. context: i was trying to speedup add check constraint then Sergei Kornilov sent me a link: [1]. so i studied that thread, then tried to implement $SUBJECT. obviously not using SPI at all. the logic is mentioned [2]: """ we could try an index scan - via index_beginscan() / index_getnext() / in