Re: Speeding up text_position_next with multibyte encodings - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Speeding up text_position_next with multibyte encodings
Date
Msg-id 505c447a-5e2a-2c0d-becc-c9bd2a7ebc2f@iki.fi
Whole thread Raw
In response to Re: Speeding up text_position_next with multibyte encodings  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On 23/12/2018 02:32, Heikki Linnakangas wrote:
> On 23/12/2018 02:28, Heikki Linnakangas wrote:
>> On 14/12/2018 23:40, John Naylor wrote:
>>> I just noticed that the contrib/citext test fails. I've set the status
>>> to waiting on author.
>>
>> Hmm, it works for me. What failure did you see?
> 
> Never mind, I'm seeing it now, with assertions enabled. Thanks, I'll
> investigate!

The bug was in handling empty inputs. text_position_setup assumed and 
asserted that neither the needle nor haystack are empty, expecting the 
callers to have handled those special cases already, but not all callers 
did. Here is a fixed version.

- Heikki

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Offline enabling/disabling of data checksums
Next
From: Jeff Janes
Date:
Subject: Make relcache init write errors not be fatal