1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

As suggested by Tom, this patch restricts the right-hand argument of

bytealike to TEXT.

This leaves like_escape_bytea() without anything to do, but I left it in
place in anticipation of the eventual bytea pattern selectivity
functions. If there is agreement that this would be the best long term
solution, I'll take it as a TODO for 7.4.

Joe Conway
This commit is contained in:
Bruce Momjian
2002-08-22 04:45:11 +00:00
parent c7e7672937
commit a334ae3f22
3 changed files with 11 additions and 11 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.49 2002/06/20 20:29:37 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.50 2002/08/22 04:45:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -264,7 +264,7 @@ Datum
bytealike(PG_FUNCTION_ARGS)
{
bytea *str = PG_GETARG_BYTEA_P(0);
bytea *pat = PG_GETARG_BYTEA_P(1);
text *pat = PG_GETARG_TEXT_P(1);
bool result;
unsigned char *s,
*p;
@ -285,7 +285,7 @@ Datum
byteanlike(PG_FUNCTION_ARGS)
{
bytea *str = PG_GETARG_BYTEA_P(0);
bytea *pat = PG_GETARG_BYTEA_P(1);
text *pat = PG_GETARG_TEXT_P(1);
bool result;
unsigned char *s,
*p;