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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy