Re: strpos behavior change around empty substring in PG12
От | Robert Haas |
---|---|
Тема | Re: strpos behavior change around empty substring in PG12 |
Дата | |
Msg-id | CA+TgmoYioeMyZ61th2mUoRj00Eh1uwTQQMWqZVYKdLx+jbYQmw@mail.gmail.com обсуждение исходный текст |
Ответ на | strpos behavior change around empty substring in PG12 (Shay Rojansky <roji@roji.org>) |
Ответы |
Re: strpos behavior change around empty substring in PG12
|
Список | pgsql-hackers |
On Mon, Oct 28, 2019 at 11:02 AM Shay Rojansky <roji@roji.org> wrote: > Before PG12, select strpos('test', '') returns 1 (empty substring found at first position of the string), whereas startingwith 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.linnakangas@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
В списке pgsql-hackers по дате отправления: