Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>
>>OK. I'll look at both options and make another diff -c proposal ;-) Once
>>that's resolved I'll go back to original issue Alvar raised.
>
> Okay. When you get back to the original issue, the gold is hidden in
> src/backend/optimizer/path/indxpath.c; see the "special indexable
> operators" stuff near the bottom of that file. (It's a bit of a crock
> that this code is hardwired there, and not somehow accessed through a
> system catalog, but it's what we've got at the moment.)
Thanks.
Back on the pattern selectivity issue. With some more study I can
clearly see what you were referring to. Dragging string length through
the maze of function calls that would need it would be a mess.
In the longer term (i.e. not for 7.3) it might make sense to create a
set of pattern selectivity functions, just for bytea, that are careful
to avoid the null-terminated string assumption. But, for now, I'm
leaning toward restricting the right-hand argument of bytealike to TEXT,
as you suggested.
Joe