Stephen Frost <sfrost(at)snowman(dot)net> writes:
> I don't see why the last case can't use the index.
The planner's understanding of regexps is far weaker than yours.
(In particular, I think it's set up to abandon optimization if it
sees | anywhere.)
regards, tom lane