mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Update /contrib/fuzzystrmatch error message to mention bytes, not just
'length', which can be characters.
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Joe Conway <mail@joeconway.com>
|
* Joe Conway <mail@joeconway.com>
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/fuzzystrmatch.c,v 1.23 2007/01/05 22:19:18 momjian Exp $
|
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/fuzzystrmatch.c,v 1.24 2007/02/13 18:00:35 momjian Exp $
|
||||||
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
|
* Copyright (c) 2001-2007, PostgreSQL Global Development Group
|
||||||
* ALL RIGHTS RESERVED;
|
* ALL RIGHTS RESERVED;
|
||||||
*
|
*
|
||||||
@ -88,7 +88,7 @@ levenshtein(PG_FUNCTION_ARGS)
|
|||||||
if ((cols > MAX_LEVENSHTEIN_STRLEN + 1) || (rows > MAX_LEVENSHTEIN_STRLEN + 1))
|
if ((cols > MAX_LEVENSHTEIN_STRLEN + 1) || (rows > MAX_LEVENSHTEIN_STRLEN + 1))
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("argument exceeds max length: %d",
|
errmsg("argument exceeds the maximum length of %d bytes",
|
||||||
MAX_LEVENSHTEIN_STRLEN)));
|
MAX_LEVENSHTEIN_STRLEN)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -224,7 +224,7 @@ metaphone(PG_FUNCTION_ARGS)
|
|||||||
if (str_i_len > MAX_METAPHONE_STRLEN)
|
if (str_i_len > MAX_METAPHONE_STRLEN)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("argument exceeds max length: %d",
|
errmsg("argument exceeds the maximum length of %d bytes",
|
||||||
MAX_METAPHONE_STRLEN)));
|
MAX_METAPHONE_STRLEN)));
|
||||||
|
|
||||||
if (!(str_i_len > 0))
|
if (!(str_i_len > 0))
|
||||||
@ -236,7 +236,7 @@ metaphone(PG_FUNCTION_ARGS)
|
|||||||
if (reqlen > MAX_METAPHONE_STRLEN)
|
if (reqlen > MAX_METAPHONE_STRLEN)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||||
errmsg("output length exceeds max length: %d",
|
errmsg("output exceeds the maximum length of %d bytes",
|
||||||
MAX_METAPHONE_STRLEN)));
|
MAX_METAPHONE_STRLEN)));
|
||||||
|
|
||||||
if (!(reqlen > 0))
|
if (!(reqlen > 0))
|
||||||
|
Reference in New Issue
Block a user