Add planner support function for starts_with()

2021-10-09 Thread Tom Lane
When starts_with() and the equivalent ^@ operator were added, they were plugged into the planner in only a rather half-baked way. Selectivity estimation got taught about the operator, but the other infrastructure associated with LIKE/regex matching wasn't updated. This causes these operators to be

Re: Add planner support function for starts_with()

2021-11-17 Thread Bossart, Nathan
On 10/9/21, 10:24 AM, "Tom Lane" wrote: > With the (admittedly later) introduction of planner support functions, > it's really quite easy to do better. The attached patch adds a planner > support function for starts_with(), with these benefits: The patch looks reasonable to me. Nathan

Re: Add planner support function for starts_with()

2021-11-17 Thread Tom Lane
"Bossart, Nathan" writes: > On 10/9/21, 10:24 AM, "Tom Lane" wrote: >> With the (admittedly later) introduction of planner support functions, >> it's really quite easy to do better. The attached patch adds a planner >> support function for starts_with(), with these benefits: > The patch looks r