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

Commitcc4dd2a

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 parentac25e7b commitcc4dd2a

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
@@ -2775,6 +2775,7 @@ neqjoinsel(PG_FUNCTION_ARGS)
27752775
List*args= (List*)PG_GETARG_POINTER(2);
27762776
JoinTypejointype= (JoinType)PG_GETARG_INT16(3);
27772777
SpecialJoinInfo*sjinfo= (SpecialJoinInfo*)PG_GETARG_POINTER(4);
2778+
Oidcollation=PG_GET_COLLATION();
27782779
float8result;
27792780

27802781
if (jointype==JOIN_SEMI||jointype==JOIN_ANTI)
@@ -2821,12 +2822,14 @@ neqjoinsel(PG_FUNCTION_ARGS)
28212822

28222823
if (eqop)
28232824
{
2824-
result=DatumGetFloat8(DirectFunctionCall5(eqjoinsel,
2825-
PointerGetDatum(root),
2826-
ObjectIdGetDatum(eqop),
2827-
PointerGetDatum(args),
2828-
Int16GetDatum(jointype),
2829-
PointerGetDatum(sjinfo)));
2825+
result=
2826+
DatumGetFloat8(DirectFunctionCall5Coll(eqjoinsel,
2827+
collation,
2828+
PointerGetDatum(root),
2829+
ObjectIdGetDatum(eqop),
2830+
PointerGetDatum(args),
2831+
Int16GetDatum(jointype),
2832+
PointerGetDatum(sjinfo)));
28302833
}
28312834
else
28322835
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp