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

Commitbe93954

Browse files
committed
Fix broken compare function for tsquery_ops. Per Tom's report.
I never understood why initial authors GiST in pgsql choose sostgrange signature for 'same' method:bool *sameFn(Datum a, Datum b, bool* result)instead of simple, logicalbool sameFn(Datum a, Datum b)This change will break any existing GiST extension, so we still live withit and will live.
1 parentdc192a5 commitbe93954

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/utils/adt/tsquery_gist.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_gist.c,v 1.5 2008/04/1417:05:33 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/tsquery_gist.c,v 1.6 2008/04/20 09:17:57 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -106,8 +106,11 @@ gtsquery_same(PG_FUNCTION_ARGS)
106106
{
107107
TSQuerySign*a= (TSQuerySign*)PG_GETARG_POINTER(0);
108108
TSQuerySign*b= (TSQuerySign*)PG_GETARG_POINTER(1);
109+
bool*result= (bool*)PG_GETARG_POINTER(2);
109110

110-
PG_RETURN_POINTER(*a==*b);
111+
*result= (*a==*b) ? true : false;
112+
113+
PG_RETURN_POINTER(result);
111114
}
112115

113116
staticint

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp