!3109 _copyCreateTrigStmt中funcSource复制
Merge pull request !3109 from 暖阳/fix_bug
This commit is contained in:
@ -4552,6 +4552,15 @@ static IndexHintDefinition* _copyIndexHintDefinition(const IndexHintDefinition*
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static FunctionSources* _copyFunctionSources(const FunctionSources* from)
|
||||
{
|
||||
FunctionSources* newnode = makeNode(FunctionSources);
|
||||
COPY_STRING_FIELD(headerSrc);
|
||||
COPY_STRING_FIELD(bodySrc);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static SkewRelInfo* _copySkewRelInfo(const SkewRelInfo* from)
|
||||
{
|
||||
SkewRelInfo* newnode = makeNode(SkewRelInfo);
|
||||
@ -6260,7 +6269,7 @@ static CreateTrigStmt* _copyCreateTrigStmt(const CreateTrigStmt* from)
|
||||
COPY_STRING_FIELD(trgordername);
|
||||
COPY_SCALAR_FIELD(is_follows);
|
||||
COPY_STRING_FIELD(schemaname);
|
||||
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
@ -8686,6 +8695,9 @@ void* copyObject(const void* from)
|
||||
case T_IndexHintDefinition:
|
||||
retval = _copyIndexHintDefinition((IndexHintDefinition *)from);
|
||||
break;
|
||||
case T_FunctionSources:
|
||||
retval = _copyFunctionSources((FunctionSources *)from);
|
||||
break;
|
||||
default:
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNRECOGNIZED_NODE_TYPE), errmsg("copyObject: unrecognized node type: %d", (int)nodeTag(from))));
|
||||
|
@ -2155,6 +2155,13 @@ static bool _equalIndexHintRelationData (const IndexHintRelationData* a, const I
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool _equalFunctionSources(const FunctionSources* a, const FunctionSources* b)
|
||||
{
|
||||
COMPARE_STRING_FIELD(headerSrc);
|
||||
COMPARE_STRING_FIELD(bodySrc);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool _equalCreatePolicyLabelStmt(const CreatePolicyLabelStmt* a, const CreatePolicyLabelStmt* b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(if_not_exists);
|
||||
@ -4435,7 +4442,9 @@ bool equal(const void* a, const void* b)
|
||||
case T_IndexHintRelationData:
|
||||
retval = _equalIndexHintRelationData((IndexHintRelationData *)a, (IndexHintRelationData *)b);
|
||||
break;
|
||||
|
||||
case T_FunctionSources:
|
||||
retval = _equalFunctionSources((const FunctionSources *)a, (const FunctionSources *)b);
|
||||
break;
|
||||
|
||||
default:
|
||||
ereport(ERROR,
|
||||
|
@ -604,7 +604,8 @@ static const TagStr g_tagStrArr[] = {{T_Invalid, "Invalid"},
|
||||
{T_SetVariableExpr, "SetVariableExpr"},
|
||||
{T_VariableMultiSetStmt, "VariableMultiSetStmt"},
|
||||
{T_IndexHintDefinition, "IndexHintDefinition"},
|
||||
{T_IndexHintRelationData, "IndexHintRelationData"}
|
||||
{T_IndexHintRelationData, "IndexHintRelationData"},
|
||||
{T_FunctionSources, "FunctionSources"}
|
||||
};
|
||||
|
||||
char* nodeTagToString(NodeTag tag)
|
||||
|
@ -827,7 +827,8 @@ typedef enum NodeTag {
|
||||
T_CentroidPoint,
|
||||
T_UserSetElem,
|
||||
T_UserVar,
|
||||
T_CharsetCollateOptions
|
||||
T_CharsetCollateOptions,
|
||||
T_FunctionSources
|
||||
} NodeTag;
|
||||
|
||||
/* if you add to NodeTag also need to add nodeTagToString */
|
||||
|
@ -2223,6 +2223,7 @@ typedef struct CreateFunctionStmt {
|
||||
} CreateFunctionStmt;
|
||||
|
||||
typedef struct FunctionSources {
|
||||
NodeTag type;
|
||||
char* headerSrc;
|
||||
char* bodySrc;
|
||||
} FunctionSources;
|
||||
|
Reference in New Issue
Block a user