Re: Unexpected "cache lookup failed for collation 0" failure
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Manuel Rigger <rigger.manuel@gmail.com>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Date: 2019-11-14T04:09:12Z
Lists: pgsql-bugs
Michael Paquier <michael@paquier.xyz> writes: > On Wed, Nov 13, 2019 at 03:56:11PM -0500, Tom Lane wrote: >> Looks like a simple oversight --- when bpcharne() was made >> collation-sensitive, it should have grown a check_collation_set() >> call, but somehow that got left out. Fixed. > Wouldn't it be better to add a test case for that? Didn't see the point particularly; we're not any more likely to break this function than any other collation-dependent function. The real question IMO is whether Peter missed any *other* places. I dug through varlena.c and varchar.c and confirmed that every call of PG_GET_COLLATION leads to a collation-is-not-zero test (after this fix), but I didn't try to search the whole backend. regards, tom lane
Commits
-
Add missing check_collation_set call to bpcharne().
- d57d61533a2b 13.0 landed
- 5a6eea0926f4 12.2 landed