diff --git a/src/common/backend/nodes/copyfuncs.cpp b/src/common/backend/nodes/copyfuncs.cpp index fbbbde7e2..e94cb815c 100644 --- a/src/common/backend/nodes/copyfuncs.cpp +++ b/src/common/backend/nodes/copyfuncs.cpp @@ -7815,6 +7815,14 @@ static CharsetClause *_copyCharsetClause(const CharsetClause* from) return newnode; } +static ShrinkStmt *_copyShrinkStmt(const ShrinkStmt* from) +{ + ShrinkStmt* newnode = makeNode(ShrinkStmt); + COPY_NODE_FIELD(relations); + COPY_SCALAR_FIELD(nowait); + return newnode; +} + static PrefixKey* _copyPrefixKey(const PrefixKey* from) { PrefixKey* newnode = makeNode(PrefixKey); @@ -9286,6 +9294,9 @@ void* copyObject(const void* from) case T_CharsetClause: retval = _copyCharsetClause((CharsetClause *)from); break; + case T_ShrinkStmt: + retval = _copyShrinkStmt((ShrinkStmt*) from); + break; #ifdef USE_SPQ case T_Motion: retval = _copyMotion((Motion*)from); diff --git a/src/common/backend/nodes/equalfuncs.cpp b/src/common/backend/nodes/equalfuncs.cpp index 81c433b45..b0f0562d9 100644 --- a/src/common/backend/nodes/equalfuncs.cpp +++ b/src/common/backend/nodes/equalfuncs.cpp @@ -3627,6 +3627,14 @@ static bool _equalCharsetClause(const CharsetClause* a, const CharsetClause* b) return true; } + +static bool _equalShrinkStmt(const ShrinkStmt* a, const ShrinkStmt* b) +{ + COMPARE_NODE_FIELD(relations); + COMPARE_SCALAR_FIELD(nowait); + return true; +} + static bool _equalPrefixKey(const PrefixKey* a, const PrefixKey* b) { COMPARE_NODE_FIELD(arg); @@ -4636,6 +4644,9 @@ bool equal(const void* a, const void* b) case T_CharsetClause: retval = _equalCharsetClause((const CharsetClause*) a, (const CharsetClause*) b); break; + case T_ShrinkStmt: + retval = _equalShrinkStmt((const ShrinkStmt*)a, (const ShrinkStmt*)b); + break; case T_PrefixKey: retval = _equalPrefixKey((PrefixKey *)a, (PrefixKey *)b); break; diff --git a/src/common/backend/nodes/outfuncs.cpp b/src/common/backend/nodes/outfuncs.cpp index e70984e91..c0f30f9d3 100755 --- a/src/common/backend/nodes/outfuncs.cpp +++ b/src/common/backend/nodes/outfuncs.cpp @@ -6384,6 +6384,14 @@ static void _outCharsetClause(StringInfo str, CharsetClause* node) WRITE_LOCATION_FIELD(location); } +static void _outShrinkStmt(StringInfo str, ShrinkStmt* node) +{ + WRITE_NODE_TYPE("SHRINK"); + WRITE_NODE_FIELD(relations); + WRITE_BOOL_FIELD(nowait); +} + + static void _outPrefixKey(StringInfo str, PrefixKey* node) { WRITE_NODE_TYPE("PREFIXKEY"); @@ -7375,6 +7383,9 @@ static void _outNode(StringInfo str, const void* obj) case T_CharsetClause: _outCharsetClause(str, (CharsetClause*)obj); break; + case T_ShrinkStmt: + _outShrinkStmt(str, (ShrinkStmt*)obj); + break; case T_AutoIncrement: _outAutoIncrement(str, (AutoIncrement*)obj); break; diff --git a/src/common/backend/nodes/readfuncs.cpp b/src/common/backend/nodes/readfuncs.cpp index f6d48f8a1..4b1844e28 100755 --- a/src/common/backend/nodes/readfuncs.cpp +++ b/src/common/backend/nodes/readfuncs.cpp @@ -6485,6 +6485,16 @@ static CharsetClause* _readCharsetClause() READ_DONE(); } +static ShrinkStmt* _readShrinkStmt() +{ + READ_LOCALS(ShrinkStmt); + + READ_NODE_FIELD(relations); + READ_BOOL_FIELD(nowait); + + READ_DONE(); +} + static PrefixKey* _readPrefixKey() { READ_LOCALS(PrefixKey); @@ -7105,7 +7115,9 @@ Node* parseNodeString(void) return_value = _readRotateClause(); } else if (MATCH("UNROTATEINFO", 12)) { return_value = _readUnrotateClause(); - } else { + } else if (MATCH("SHRINK", 6)) { + return_value = _readShrinkStmt(); + } else { ereport(ERROR, (errcode(ERRCODE_UNRECOGNIZED_NODE_TYPE), errmsg("parseNodeString(): badly formatted node string \"%s\"...", token)));