Re: Report error position in partition bound check - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Report error position in partition bound check
Date
Msg-id CAG-ACPWfT3xgT-QJgeq-bQh9iMXoyNXkLe3+FvY64xaciL5XEA@mail.gmail.com
Whole thread Raw
In response to Re: Report error position in partition bound check  (Alexandra Wang <alexandra.wanglei@gmail.com>)
Responses Re: Report error position in partition bound check  (Michael Paquier <michael@paquier.xyz>)
Re: Report error position in partition bound check  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers


On Fri, 10 Jul 2020 at 23:31, Alexandra Wang <alexandra.wanglei@gmail.com> wrote:


Thank you Daniel. Here's the rebased patch. I also squashed the two
patches into one so it's easier to review.

Thanks for rebasing patch. It applies cleanly still. Here are some comments
@@ -3320,7 +3338,9 @@ make_one_partition_rbound(PartitionKey key, int index, List *datums, bool lower)
  * partition_rbound_cmp
  *
  * Return for two range bounds whether the 1st one (specified in datums1,

I think it's better to reword it as. "For two range bounds decide whether ...

- * kind1, and lower1) is <, =, or > the bound specified in *b2.
+ * kind1, and lower1) is <, =, or > the bound specified in *b2. 0 is returned if
+ * equal and the 1-based index of the first mismatching bound if unequal;
+ * multiplied by -1 if the 1st bound is smaller.

This sentence makes sense after the above correction. I liked this change,
requires very small changes in other parts.

 
 /*
@@ -3495,7 +3518,7 @@ static int
 partition_range_bsearch(int partnatts, FmgrInfo *partsupfunc,
                        Oid *partcollation,
                        PartitionBoundInfo boundinfo,
-                       PartitionRangeBound *probe, bool *is_equal)
+                       PartitionRangeBound *probe, bool *is_equal, int32 *cmpval)

Please update the prologue explaining the new argument. 

After this change, the patch will be ready for a committer.
--
Best Wishes,
Ashutosh

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Allow continuations in "pg_hba.conf" files
Next
From: Alvaro Herrera
Date:
Subject: Re: Rare deadlock failure in create_am test