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

Commitcd8da52

Browse files
author
Markus Nullmeier
committed
adapt custom crossmatch executor node to PostgreSQL 10
Due to changes in the executor of the upcoming PostgreSQL 10,the API changes for set returning expressions in commits69f4b9c85f168ae006929eec44fc44d569e846b9,ea15e18677fc2eff3135023e27f69ed8821554ed,and b8d7f053c5c2bf2a7e8734fe3327f6a8bc711755of the PostgreSQL git repository required some adaptionin init.c.For details, see the respective commits and especiallytheir commit messages, and also the discussion starting athttps://postgr.es/m/20160822214023.aaxz5l4igypowyri@alap3.anarazel.de
1 parent3a900cc commitcd8da52

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

‎init.c‎

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#include"nodes/extensible.h"
2929
#endif
3030

31+
#ifPG_VERSION_NUM >=100000
32+
#include"utils/regproc.h"
33+
#endif
34+
3135
#include"point.h"
3236
#include"crossmatch.h"
3337

@@ -651,6 +655,14 @@ fetch_next_pair(CrossmatchScanState *scan_state)
651655
returnFetchTidPairReady;
652656
}
653657

658+
#ifPG_VERSION_NUM<100000
659+
#defineCOMPAT_PROJECT_ARG , &isDone
660+
#defineCOMPAT_QUAL_ARG , false
661+
#else
662+
#defineCOMPAT_PROJECT_ARG
663+
#defineCOMPAT_QUAL_ARG
664+
#endif
665+
654666
staticTupleTableSlot*
655667
crossmatch_exec(CustomScanState*node)
656668
{
@@ -659,7 +671,11 @@ crossmatch_exec(CustomScanState *node)
659671

660672
for (;;)
661673
{
674+
#ifPG_VERSION_NUM<100000
675+
ExprDoneCondisDone;
676+
662677
if (!node->ss.ps.ps_TupFromTlist)
678+
#endif
663679
{
664680
FetchTidPairStatefetch_state;
665681

@@ -675,33 +691,38 @@ crossmatch_exec(CustomScanState *node)
675691

676692
if (node->ss.ps.ps_ProjInfo)
677693
{
678-
ExprDoneCondisDone;
679694
TupleTableSlot*resultSlot;
680695

681696
ResetExprContext(node->ss.ps.ps_ProjInfo->pi_exprContext);
682697

683698
node->ss.ps.ps_ProjInfo->pi_exprContext->ecxt_scantuple=scanSlot;
684-
resultSlot=ExecProject(node->ss.ps.ps_ProjInfo,&isDone);
685-
699+
resultSlot=ExecProject(node->ss.ps.ps_ProjInfo
700+
COMPAT_PROJECT_ARG);
701+
#ifPG_VERSION_NUM<100000
686702
if (isDone!=ExprEndResult)
687703
{
688704
node->ss.ps.ps_TupFromTlist= (isDone==ExprMultipleResult);
705+
#endif
689706

690707
/* Check join conditions */
691708
node->ss.ps.ps_ExprContext->ecxt_scantuple=scanSlot;
692-
if (ExecQual(node->ss.ps.qual,node->ss.ps.ps_ExprContext, false))
709+
if (ExecQual(node->ss.ps.qual,node->ss.ps.ps_ExprContext
710+
COMPAT_QUAL_ARG))
693711
returnresultSlot;
694712
else
695713
InstrCountFiltered1(node,1);
714+
#ifPG_VERSION_NUM<100000
696715
}
697716
else
698717
node->ss.ps.ps_TupFromTlist= false;
718+
#endif
699719
}
700720
else
701721
{
702722
/* Check join conditions */
703723
node->ss.ps.ps_ExprContext->ecxt_scantuple=scanSlot;
704-
if (ExecQual(node->ss.ps.qual,node->ss.ps.ps_ExprContext, false))
724+
if (ExecQual(node->ss.ps.qual,node->ss.ps.ps_ExprContext
725+
COMPAT_QUAL_ARG))
705726
returnscanSlot;
706727
else
707728
InstrCountFiltered1(node,1);
@@ -723,8 +744,10 @@ crossmatch_end(CustomScanState *node)
723744
staticvoid
724745
crossmatch_rescan(CustomScanState*node)
725746
{
747+
#ifPG_VERSION_NUM<100000
726748
/* NOTE: nothing to do here? */
727749
node->ss.ps.ps_TupFromTlist= false;
750+
#endif
728751
}
729752

730753
staticvoid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp