同步关键字降级需求
This commit is contained in:
@ -3774,6 +3774,7 @@ static UpsertClause* _copyUpsertClause(const UpsertClause* from)
|
||||
UpsertClause* newnode = makeNode(UpsertClause);
|
||||
|
||||
COPY_NODE_FIELD(targetList);
|
||||
COPY_NODE_FIELD(aliasName);
|
||||
COPY_LOCATION_FIELD(location);
|
||||
COPY_NODE_FIELD(whereClause);
|
||||
|
||||
|
||||
@ -3043,6 +3043,7 @@ static bool _equalStartWithClause(const StartWithClause * a, const StartWithClau
|
||||
static bool _equalUpsertClause(const UpsertClause* a, const UpsertClause* b)
|
||||
{
|
||||
COMPARE_NODE_FIELD(targetList);
|
||||
COMPARE_NODE_FIELD(aliasName);
|
||||
COMPARE_LOCATION_FIELD(location);
|
||||
COMPARE_NODE_FIELD(whereClause);
|
||||
|
||||
|
||||
@ -870,6 +870,9 @@ static void _outUpsertClause(StringInfo str, const UpsertClause* node)
|
||||
WRITE_NODE_TYPE("UPSERTCLAUSE");
|
||||
|
||||
WRITE_NODE_FIELD(targetList);
|
||||
if (t_thrd.proc->workingVersionNum >= UPSERT_ALIAS_VERSION_NUM) {
|
||||
WRITE_NODE_FIELD(aliasName);
|
||||
}
|
||||
WRITE_INT_FIELD(location);
|
||||
if (t_thrd.proc->workingVersionNum >= UPSERT_WHERE_VERSION_NUM) {
|
||||
WRITE_NODE_FIELD(whereClause);
|
||||
|
||||
@ -4307,6 +4307,9 @@ static UpsertClause* _readUpsertClause(void)
|
||||
READ_LOCALS(UpsertClause);
|
||||
|
||||
READ_NODE_FIELD(targetList);
|
||||
IF_EXIST(aliasName) {
|
||||
READ_NODE_FIELD(aliasName);
|
||||
}
|
||||
READ_INT_FIELD(location);
|
||||
IF_EXIST(whereClause) {
|
||||
READ_NODE_FIELD(whereClause);
|
||||
|
||||
@ -80,6 +80,7 @@ const uint32 GRAND_VERSION_NUM = 92856;
|
||||
* 2.VERSION NUM FOR EACH FEATURE
|
||||
* Please write indescending order.
|
||||
********************************************/
|
||||
const uint32 UPSERT_ALIAS_VERSION_NUM = 92856;
|
||||
const uint32 MULTI_CHARSET_VERSION_NUM = 92856;
|
||||
const uint32 SRF_FUSION_VERSION_NUM = 92847;
|
||||
const uint32 INNER_UNIQUE_VERSION_NUM = 92845;
|
||||
|
||||
@ -129,6 +129,7 @@ extern const uint32 CREATE_INDEX_IF_NOT_EXISTS_VERSION_NUM;
|
||||
extern const uint32 SLOW_SQL_VERSION_NUM;
|
||||
extern const uint32 INDEX_HINT_VERSION_NUM;
|
||||
extern const uint32 CREATE_TABLE_AS_VERSION_NUM;
|
||||
extern const uint32 UPSERT_ALIAS_VERSION_NUM;
|
||||
|
||||
extern void register_backend_version(uint32 backend_version);
|
||||
extern bool contain_backend_version(uint32 version_number);
|
||||
|
||||
@ -451,6 +451,7 @@ typedef struct HintState {
|
||||
typedef struct UpsertClause {
|
||||
NodeTag type;
|
||||
List *targetList;
|
||||
Alias *aliasName;
|
||||
Node *whereClause;
|
||||
int location;
|
||||
} UpsertClause;
|
||||
|
||||
Reference in New Issue
Block a user