pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Sync patternsel_common's operator selection logic with pattern_p
Date: Wed, 20 Nov 2019 20:00:32 +0000
Message-ID: <E1iXW9Q-00082R-8e@gemulon.postgresql.org> (raw)

Sync patternsel_common's operator selection logic with pattern_prefix's.

Make patternsel_common() select the comparison operators to use with
hardwired logic that matches pattern_prefix()'s new logic, eliminating
its dependencies on particular index opfamilies.

This shouldn't change any behavior, as it's just replacing runtime
operator lookups with the same values hard-wired.  But it makes these
closely-related functions look more alike, and saving some runtime
syscache lookups is worth something.

Actually, it's not quite true that this is zero behavioral change:
when estimating for a column of type "name", the comparison constant
will be kept as "text" not coerced to "name".  But that's more correct
anyway, and it allows additional simplification of the coercion logic,
again syncing this more closely with pattern_prefix().

Per consideration of a report from Manuel Rigger.

Discussion: https://postgr.es/m/CA+u7OA7nnGYy8rY0vdTe811NuA+Frr9nbcBO9u2Z+JxqNaud+g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9ff5b699ed3e2d922ff6f5660e53b51bb5db983c

Modified Files
--------------
src/backend/utils/adt/like_support.c | 119 +++++++++++++++++------------------
1 file changed, 58 insertions(+), 61 deletions(-)



Message-ID: <E1iXW9Q-00082R-8e@gemulon.postgresql.org>
Permalink:  ../E1iXW9Q-00082R-8e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iXW9Q-00082R-8e@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Sync patternsel_common's operator selection logic with pattern_p
  In-Reply-To: <E1iXW9Q-00082R-8e@gemulon.postgresql.org>
  References: <E1iXW9Q-00082R-8e@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox