Content-Length: 281832 | pFad | http://github.com/postgrespro/postgres/commit/f15c2eae9c2f36830fae40935bd8cdcede4b75a0

6E Remove unnecessary pg_verifymbstr() calls from tsvector/query in func… · postgrespro/postgres@f15c2ea · GitHub
Skip to content

Commit f15c2ea

Browse files
committed
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.
1 parent 9e4637b commit f15c2ea

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/backend/utils/adt/tsquery.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,6 @@ tsqueryin(PG_FUNCTION_ARGS)
570570
{
571571
char *in = PG_GETARG_CSTRING(0);
572572

573-
pg_verifymbstr(in, strlen(in), false);
574-
575573
PG_RETURN_TSQUERY(parse_tsquery(in, pushval_asis, PointerGetDatum(NULL), false));
576574
}
577575

src/backend/utils/adt/tsvector.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ tsvectorin(PG_FUNCTION_ARGS)
198198
char *cur;
199199
int buflen = 256; /* allocated size of tmpbuf */
200200

201-
pg_verifymbstr(buf, strlen(buf), false);
202-
203201
state = init_tsvector_parser(buf, false, false);
204202

205203
arrlen = 64;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f15c2eae9c2f36830fae40935bd8cdcede4b75a0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy