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

Commit17d15dd

Browse files
committed
Fix incorrect pfree in to_tsquery_name(), per Nigel Andrews.
1 parent06e3ec7 commit17d15dd

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

‎contrib/tsearch2/query.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -884,22 +884,18 @@ Datum
884884
to_tsquery_name(PG_FUNCTION_ARGS)
885885
{
886886
text*name=PG_GETARG_TEXT_P(0);
887-
Datumres=DirectFunctionCall2(
888-
to_tsquery,
887+
Datumres=DirectFunctionCall2(to_tsquery,
889888
Int32GetDatum(name2id_cfg(name)),
890-
PG_GETARG_DATUM(1)
891-
);
889+
PG_GETARG_DATUM(1));
892890

893-
PG_FREE_IF_COPY(name,1);
891+
PG_FREE_IF_COPY(name,0);
894892
PG_RETURN_DATUM(res);
895893
}
896894

897895
Datum
898896
to_tsquery_current(PG_FUNCTION_ARGS)
899897
{
900-
PG_RETURN_DATUM(DirectFunctionCall2(
901-
to_tsquery,
898+
PG_RETURN_DATUM(DirectFunctionCall2(to_tsquery,
902899
Int32GetDatum(get_currcfg()),
903-
PG_GETARG_DATUM(0)
904-
));
900+
PG_GETARG_DATUM(0)));
905901
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp