Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf15c2ea

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 parent9e4637b commitf15c2ea

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
intbuflen=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)

[8]ページ先頭

©2009-2025 Movatter.jp