strpos behavior change around empty substring in PG12 - Mailing list pgsql-hackers

From Shay Rojansky
Subject strpos behavior change around empty substring in PG12
Date
Msg-id CADT4RqAz7oN4vkPir86Kg1_mQBmBxCp-L_=9vRpgSNPJf0KRkw@mail.gmail.com
Whole thread Raw
Responses Re: strpos behavior change around empty substring in PG12
List pgsql-hackers
Greetings hackers,

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...


Thanks,

Shay

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] Do not use StdRdOptions in Access Methods
Next
From: Alvaro Herrera
Date:
Subject: Re: update ALTER TABLE with ATTACH PARTITION lock mode