Search Postgresql Archives

Re: Difference between text_pattern_ops and varchar_pattern_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2021-06-25 at 12:29 +0200, David Morgenstern wrote:
> The documentation for operator classes (https://www.postgresql.org/docs/current/indexes-opclass.html)
>  seems to indicate that text_pattern_ops should only be used for text columns
>  and varchar_pattern_ops should 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 why text_pattern_ops can be used on varchar columns, considering it
>  can’t be used for bpchar columns? And are there any downsides in doing this
>  (aside from my confusion of course)?

https://www.postgresql.org/message-id/flat/A737B7A37273E048B164557ADEF4A58B17CCE003%40ntex2010i.host.magwien.gv.at

Yours,
Laurenz Albe
-- 
+43-670-6056265
CYBERTEC PostgreSQL International GmbH
Gröhrmühlgasse 26, A-2700 Wiener Neustadt
Web: https://www.cybertec-postgresql.com






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux