On Mon, Oct 28, 2019 at 11:02 AM Shay Rojansky <r...@roji.org> wrote:
> Before PG12, select strpos('test', '') returns 1 (empty substring found at 
> first position of the string), whereas starting with PG12 it returns 0 (empty 
> substring not found).
>
> Is this behavior change intentional? If so, it doesn't seem to be documented 
> in the release notes...
>
> First raised by Austin Drenski in 
> https://github.com/npgsql/efcore.pg/pull/1068#issuecomment-546795826

It looks to me like this got broken here:

commit 9556aa01c69a26ca726d8dda8e395acc7c1e30fc
Author: Heikki Linnakangas <heikki.linnakan...@iki.fi>
Date:   Fri Jan 25 16:25:05 2019 +0200

    Use single-byte Boyer-Moore-Horspool search even with multibyte encodings.

Not sure what happened exactly.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Reply via email to