Unbreak index optimization for LIKE on bytea

Peter Eisentraut <peter@eisentraut.org>

Commit: abb9c63b2c00109183cdb9f588d2f23fc383ed38
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2019-04-15T07:29:17Z
Releases: 12.0
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: https://www.postgresql.org/message-id/flat/CAM2%2B6%3DWaf3qJ1%3DyVTUH8_yG-SC0xcBMY%2BSFLhvKKNnWNXSUDBw%40mail.gmail.com

Files

Discussion