Re: cache lookup failed for collation 0
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Jeevan Chalke <jeevan.chalke@enterprisedb.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-04-12T07:56:09Z
Lists: pgsql-hackers
Attachments
- 0001-Unbreak-index-optimization-for-LIKE-on-bytea.patch (text/plain) patch 0001
On 2019-04-11 17:04, Jeevan Chalke wrote: > The error is coming from get_collation_isdeterministic() when colloid > passed is 0. I think like we do in get_collation_name(), we should > return false here when such collation oid does not exist. I'm not in favor of doing that. It would risk papering over errors of omission at other call sites. The root cause is that the same code match_pattern_prefix() is being used for text and bytea, but bytea does not use collations, so having the collation 0 is expected, and we shouldn't call get_collation_isdeterministic() in that case. Proposed patch attached. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Unbreak index optimization for LIKE on bytea
- abb9c63b2c00 12.0 landed
-
Collations with nondeterministic comparison
- 5e1963fb764e 12.0 cited