diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-05-14 14:30:32 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-05-14 14:30:32 +0300 |
commit | f15c2eae9c2f36830fae40935bd8cdcede4b75a0 (patch) | |
tree | 757cee97767beff73f7e5bcb251c12f39762bed2 /src/backend/utils/adt | |
parent | 9e4637bf89ef9fbc89a45dc4b421fa6740accd41 (diff) | |
download | postgresql-f15c2eae9c2f36830fae40935bd8cdcede4b75a0.tar.gz postgresql-f15c2eae9c2f36830fae40935bd8cdcede4b75a0.zip |
Remove unnecessary pg_verifymbstr() calls from tsvector/query in functions.
The input should've been validated well before it hits the input function.
Doing so again is a waste of cycles.
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r-- | src/backend/utils/adt/tsquery.c | 2 | ||||
-rw-r--r-- | src/backend/utils/adt/tsvector.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c index 2473f0df729..6e1f8cfdb0d 100644 --- a/src/backend/utils/adt/tsquery.c +++ b/src/backend/utils/adt/tsquery.c @@ -570,8 +570,6 @@ tsqueryin(PG_FUNCTION_ARGS) { char *in = PG_GETARG_CSTRING(0); - pg_verifymbstr(in, strlen(in), false); - PG_RETURN_TSQUERY(parse_tsquery(in, pushval_asis, PointerGetDatum(NULL), false)); } diff --git a/src/backend/utils/adt/tsvector.c b/src/backend/utils/adt/tsvector.c index 4262ea9e91e..8a81f3d8295 100644 --- a/src/backend/utils/adt/tsvector.c +++ b/src/backend/utils/adt/tsvector.c @@ -198,8 +198,6 @@ tsvectorin(PG_FUNCTION_ARGS) char *cur; int buflen = 256; /* allocated size of tmpbuf */ - pg_verifymbstr(buf, strlen(buf), false); - state = init_tsvector_parser(buf, false, false); arrlen = 64; |