Commit f15c2eae authored by Heikki Linnakangas's avatar Heikki Linnakangas

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.
parent 9e4637bf
...@@ -570,8 +570,6 @@ tsqueryin(PG_FUNCTION_ARGS) ...@@ -570,8 +570,6 @@ tsqueryin(PG_FUNCTION_ARGS)
{ {
char *in = PG_GETARG_CSTRING(0); char *in = PG_GETARG_CSTRING(0);
pg_verifymbstr(in, strlen(in), false);
PG_RETURN_TSQUERY(parse_tsquery(in, pushval_asis, PointerGetDatum(NULL), false)); PG_RETURN_TSQUERY(parse_tsquery(in, pushval_asis, PointerGetDatum(NULL), false));
} }
......
...@@ -198,8 +198,6 @@ tsvectorin(PG_FUNCTION_ARGS) ...@@ -198,8 +198,6 @@ tsvectorin(PG_FUNCTION_ARGS)
char *cur; char *cur;
int buflen = 256; /* allocated size of tmpbuf */ int buflen = 256; /* allocated size of tmpbuf */
pg_verifymbstr(buf, strlen(buf), false);
state = init_tsvector_parser(buf, false, false); state = init_tsvector_parser(buf, false, false);
arrlen = 64; arrlen = 64;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment