mirror of https://github.com/citusdata/citus.git
MergeAction can have 3 merge kinds (now enum) in PG17, write compat
Relevant PG commit:
0294df2f1f842dfb0eed79007b21016f486a3c6c
0294df2f1f
pg17_kickoff
parent
e0a0874fbd
commit
49f7bffcf6
|
@ -1475,7 +1475,7 @@ FetchAndValidateInsertVarIfExists(Oid targetRelationId, Query *query)
|
|||
foreach_declared_ptr(action, query->mergeActionList)
|
||||
{
|
||||
/* Skip MATCHED clause as INSERTS are not allowed in it */
|
||||
if (action->matched)
|
||||
if (matched_compat(action))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -101,6 +101,9 @@ getStxstattarget_compat(HeapTuple tup)
|
|||
#define WaitEventSetTracker_compat CurrentResourceOwner
|
||||
|
||||
#define identitySequenceRelation_compat(a) (a)
|
||||
|
||||
#define matched_compat(a) (a->matchKind == MERGE_WHEN_MATCHED)
|
||||
|
||||
#else
|
||||
|
||||
#include "access/htup_details.h"
|
||||
|
@ -126,6 +129,8 @@ getStxstattarget_compat(HeapTuple tup)
|
|||
|
||||
#define identitySequenceRelation_compat(a) (RelationGetRelid(a))
|
||||
|
||||
#define matched_compat(a) (a->matched)
|
||||
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_16
|
||||
|
|
Loading…
Reference in New Issue