pgsql: Handle empty-string edge cases correctly in strpos().

2019-10-28 Thread Tom Lane
Handle empty-string edge cases correctly in strpos(). Commit 9556aa01c rearranged the innards of text_position() in a way that would make it not work for empty search strings. Which is fine, because all callers of that code special-case an empty pattern in some way. However, the primary use-case

pgsql: Handle empty-string edge cases correctly in strpos().

2019-10-28 Thread Tom Lane
Handle empty-string edge cases correctly in strpos(). Commit 9556aa01c rearranged the innards of text_position() in a way that would make it not work for empty search strings. Which is fine, because all callers of that code special-case an empty pattern in some way. However, the primary use-case