pgsql: Unbreak index optimization for LIKE on bytea
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.chalke@enterprisedb.com>
Discussion: /messages/by-id/CAM2+6=Waf3qJ1=yVTUH8_yG-SC0xcBMY+SFLhvKKNnWNXSUDBw@mail.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(-)