Re: Index-only scan for btree_gist turns bpchar to char - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Index-only scan for btree_gist turns bpchar to char
Date
Msg-id 301107.1641400445@sss.pgh.pa.us
Whole thread Raw
In response to Re: Index-only scan for btree_gist turns bpchar to char  (Japin Li <japinli@hotmail.com>)
Responses Re: Index-only scan for btree_gist turns bpchar to char
List pgsql-hackers
Japin Li <japinli@hotmail.com> writes:
> Here is a patch for POC testing.

This is certainly not right.  You've made gbt_bpchar_consistent
work identically to gbt_text_consistent, but it needs to implement
a test equivalent to bpchareq, ie ignore trailing spaces in both
inputs.

The minimum-effort fix would be to apply rtrim1 to both strings
in gbt_bpchar_consistent, but I wonder if we can improve on that
by pushing the ignore-trailing-spaces behavior further down.
I didn't look yet at whether gbt_var_consistent can support
any type-specific behavior.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: Index-only scan for btree_gist turns bpchar to char
Next
From: tushar
Date:
Subject: Re: refactoring basebackup.c