1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

> 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.)

The attached patch re-enables a bytea right hand argument (as compared
to a text right hand argument), and enables index usage, for bytea LIKE

Joe Conway
This commit is contained in:
Bruce Momjian
2002-09-02 06:22:20 +00:00
parent 81efc82608
commit 595a5a78e0
6 changed files with 256 additions and 154 deletions

View File

@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.51 2002/08/29 07:22:26 ishii Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.52 2002/09/02 06:22:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -242,7 +242,7 @@ Datum
bytealike(PG_FUNCTION_ARGS)
{
bytea *str = PG_GETARG_BYTEA_P(0);
text *pat = PG_GETARG_TEXT_P(1);
bytea *pat = PG_GETARG_BYTEA_P(1);
bool result;
unsigned char *s,
*p;
@ -263,7 +263,7 @@ Datum
byteanlike(PG_FUNCTION_ARGS)
{
bytea *str = PG_GETARG_BYTEA_P(0);
text *pat = PG_GETARG_TEXT_P(1);
bytea *pat = PG_GETARG_BYTEA_P(1);
bool result;
unsigned char *s,
*p;