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

Commit171633f

Browse files
committed
neqjoinsel must now pass through collation to eqjoinsel.
Since commit044c99b, eqjoinsel passes the passed-in collationto any operators it invokes. However, neqjoinsel failed to passon whatever collation it got, so that if we invoked acollation-dependent operator via that code path, we'd get "could notdetermine which collation to use for string comparison" or the like.Per report from Justin Pryzby. Back-patch to v12, like the previouscommit.Discussion:https://postgr.es/m/20200721191606.GL5748@telsasoft.com
1 parent43ef3c4 commit171633f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,6 +2552,7 @@ neqjoinsel(PG_FUNCTION_ARGS)
25522552
List*args= (List*)PG_GETARG_POINTER(2);
25532553
JoinTypejointype= (JoinType)PG_GETARG_INT16(3);
25542554
SpecialJoinInfo*sjinfo= (SpecialJoinInfo*)PG_GETARG_POINTER(4);
2555+
Oidcollation=PG_GET_COLLATION();
25552556
float8result;
25562557

25572558
if (jointype==JOIN_SEMI||jointype==JOIN_ANTI)
@@ -2598,12 +2599,14 @@ neqjoinsel(PG_FUNCTION_ARGS)
25982599

25992600
if (eqop)
26002601
{
2601-
result=DatumGetFloat8(DirectFunctionCall5(eqjoinsel,
2602-
PointerGetDatum(root),
2603-
ObjectIdGetDatum(eqop),
2604-
PointerGetDatum(args),
2605-
Int16GetDatum(jointype),
2606-
PointerGetDatum(sjinfo)));
2602+
result=
2603+
DatumGetFloat8(DirectFunctionCall5Coll(eqjoinsel,
2604+
collation,
2605+
PointerGetDatum(root),
2606+
ObjectIdGetDatum(eqop),
2607+
PointerGetDatum(args),
2608+
Int16GetDatum(jointype),
2609+
PointerGetDatum(sjinfo)));
26072610
}
26082611
else
26092612
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp