From a334ae3f2237d55369ac4b5cd6e9dbc2d35ab76d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 22 Aug 2002 04:45:11 +0000 Subject: 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 --- src/backend/utils/adt/like.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/adt/like.c') diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c index c55538b1e32..1ce4de6d99a 100644 --- a/src/backend/utils/adt/like.c +++ b/src/backend/utils/adt/like.c @@ -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; -- cgit v1.2.3