Re: Difference between text_pattern_ops and varchar_pattern_ops

2021-06-25 Thread Tom Lane
David Morgenstern writes: > Can somebody explain why text_pattern_ops can be used on varchar > columns, considering it can’t be used for bpchar columns? The underlying rule there is that an opclass can be applied to an index column if the column's actual type is binary-coercible to what the opcla

Re: Difference between text_pattern_ops and varchar_pattern_ops

2021-06-25 Thread Laurenz Albe
be used for varchar columns. > However today I stumbled upon an index using text_pattern_ops on a varchar > column. > Everything seems to be working fine. Now I am wondering what the difference > between text_pattern_ops and varchar_pattern_ops might be. > > Can somebody explain wh

Difference between text_pattern_ops and varchar_pattern_ops

2021-06-25 Thread David Morgenstern
e used for varchar columns. However today I stumbled upon an index using text_pattern_ops on a varchar column. Everything seems to be working fine. Now I am wondering what the difference between text_pattern_ops and varchar_pattern_ops might be. Can somebody explain why text_pattern_ops can be u