Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita334ae3

Browse files
committed
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 inplace in anticipation of the eventual bytea pattern selectivityfunctions. If there is agreement that this would be the best long termsolution, I'll take it as a TODO for 7.4.Joe Conway
1 parentc7e7672 commita334ae3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

‎src/backend/utils/adt/like.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
*$Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.49 2002/06/20 20:29:37 momjian Exp $
14+
*$Header: /cvsroot/pgsql/src/backend/utils/adt/like.c,v 1.50 2002/08/22 04:45:11 momjian Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -264,7 +264,7 @@ Datum
264264
bytealike(PG_FUNCTION_ARGS)
265265
{
266266
bytea*str=PG_GETARG_BYTEA_P(0);
267-
bytea*pat=PG_GETARG_BYTEA_P(1);
267+
text*pat=PG_GETARG_TEXT_P(1);
268268
boolresult;
269269
unsignedchar*s,
270270
*p;
@@ -285,7 +285,7 @@ Datum
285285
byteanlike(PG_FUNCTION_ARGS)
286286
{
287287
bytea*str=PG_GETARG_BYTEA_P(0);
288-
bytea*pat=PG_GETARG_BYTEA_P(1);
288+
text*pat=PG_GETARG_TEXT_P(1);
289289
boolresult;
290290
unsignedchar*s,
291291
*p;

‎src/include/catalog/pg_operator.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: pg_operator.h,v 1.106 2002/07/24 19:11:12 petere Exp $
11+
* $Id: pg_operator.h,v 1.107 2002/08/22 04:45:11 momjian Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -827,9 +827,9 @@ DATA(insert OID = 1957 ( "<" PGNSP PGUID b f 17 1716 1959 1960 0 0 0 0
827827
DATA(insertOID=1958 ("<="PGNSPPGUIDbf171716196019590000bytealescalarltselscalarltjoinsel ));
828828
DATA(insertOID=1959 (">"PGNSPPGUIDbf171716195719580000byteagtscalargtselscalargtjoinsel ));
829829
DATA(insertOID=1960 (">="PGNSPPGUIDbf171716195819570000byteagescalargtselscalargtjoinsel ));
830-
DATA(insertOID=2016 ("~~"PGNSPPGUIDbf171716020170000bytealikelikesellikejoinsel ));
830+
DATA(insertOID=2016 ("~~"PGNSPPGUIDbf172516020170000bytealikelikesellikejoinsel ));
831831
#defineOID_BYTEA_LIKE_OP2016
832-
DATA(insertOID=2017 ("!~~"PGNSPPGUIDbf171716020160000byteanlikenlikeselnlikejoinsel ));
832+
DATA(insertOID=2017 ("!~~"PGNSPPGUIDbf172516020160000byteanlikenlikeselnlikejoinsel ));
833833
DATA(insertOID=2018 ("||"PGNSPPGUIDbf171717000000byteacat-- ));
834834

835835
/* timestamp operators */

‎src/include/catalog/pg_proc.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_proc.h,v 1.262 2002/08/22 04:41:06 momjian Exp $
10+
* $Id: pg_proc.h,v 1.263 2002/08/22 04:45:11 momjian Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2773,13 +2773,13 @@ DESCR("adjust time precision");
27732773
DATA(insertOID=1969 (timetzPGNSPPGUID12fftfi21266"1266 23"timetz_scale-_null_ ));
27742774
DESCR("adjust time with time zone precision");
27752775

2776-
DATA(insertOID=2005 (bytealikePGNSPPGUID12fftfi216"1717"bytealike-_null_ ));
2776+
DATA(insertOID=2005 (bytealikePGNSPPGUID12fftfi216"1725"bytealike-_null_ ));
27772777
DESCR("matches LIKE expression");
2778-
DATA(insertOID=2006 (byteanlikePGNSPPGUID12fftfi216"1717"byteanlike-_null_ ));
2778+
DATA(insertOID=2006 (byteanlikePGNSPPGUID12fftfi216"1725"byteanlike-_null_ ));
27792779
DESCR("does not match LIKE expression");
2780-
DATA(insertOID=2007 (likePGNSPPGUID12fftfi216"1717"bytealike-_null_ ));
2780+
DATA(insertOID=2007 (likePGNSPPGUID12fftfi216"1725"bytealike-_null_ ));
27812781
DESCR("matches LIKE expression");
2782-
DATA(insertOID=2008 (notlikePGNSPPGUID12fftfi216"1717"byteanlike-_null_ ));
2782+
DATA(insertOID=2008 (notlikePGNSPPGUID12fftfi216"1725"byteanlike-_null_ ));
27832783
DESCR("does not match LIKE expression");
27842784
DATA(insertOID=2009 (like_escapePGNSPPGUID12fftfi217"17 17"like_escape_bytea-_null_ ));
27852785
DESCR("convert match pattern to use backslash escapes");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp