pgsql: Unbreak index optimization for LIKE on bytea

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Unbreak index optimization for LIKE on bytea
Date: 2019-04-15 07:35:04
Message-ID: E1hFw8u-0001Hh-5G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Unbreak index optimization for LIKE on bytea

The same code is used to handle both text and bytea, but bytea is not
collation-aware, so we shouldn't call get_collation_isdeterministic()
in that case, since that will error out with an invalid collation.

Reported-by: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CAM2%2B6%3DWaf3qJ1%3DyVTUH8_yG-SC0xcBMY%2BSFLhvKKNnWNXSUDBw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/abb9c63b2c00109183cdb9f588d2f23fc383ed38

Modified Files
--------------
src/backend/utils/adt/like_support.c | 4 +++-
src/test/regress/expected/strings.out | 16 ++++++++++++++++
src/test/regress/sql/strings.sql | 13 +++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Masahiko Sawada 2019-04-15 08:23:05 Re: pgsql: Increase upper limit for vacuum_cleanup_index_scale_factor
Previous Message Michael Paquier 2019-04-15 03:35:56 pgsql: Fix SHOW ALL command for non-superusers with replication connect