Add missing copyfuncs/equalfuncs support for AlterTSDictionaryStmt and
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Feb 2008 20:19:47 +0000 (20:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Feb 2008 20:19:47 +0000 (20:19 +0000)
AlterTSConfigurationStmt.  All utility statement node types are expected
to be supported here, though they do not have to have outfuncs/readfuncs
support.  Found by running regression tests with COPY_PARSE_PLAN_TREES
enabled.

src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c

index a243b652e58f0b5a3706703fef9706beb5f45833..f7c1fd070a0b5eff4beeebb4a97d521a4c84a112 100644 (file)
@@ -2897,6 +2897,32 @@ _copyReassignOwnedStmt(ReassignOwnedStmt *from)
        return newnode;
 }
 
+static AlterTSDictionaryStmt *
+_copyAlterTSDictionaryStmt(AlterTSDictionaryStmt *from)
+{
+       AlterTSDictionaryStmt *newnode = makeNode(AlterTSDictionaryStmt);
+
+       COPY_NODE_FIELD(dictname);
+       COPY_NODE_FIELD(options);
+
+       return newnode;
+}
+
+static AlterTSConfigurationStmt *
+_copyAlterTSConfigurationStmt(AlterTSConfigurationStmt *from)
+{
+       AlterTSConfigurationStmt *newnode = makeNode(AlterTSConfigurationStmt);
+
+       COPY_NODE_FIELD(cfgname);
+       COPY_NODE_FIELD(tokentype);
+       COPY_NODE_FIELD(dicts);
+       COPY_SCALAR_FIELD(override);
+       COPY_SCALAR_FIELD(replace);
+       COPY_SCALAR_FIELD(missing_ok);
+
+       return newnode;
+}
+
 /* ****************************************************************
  *                                     pg_list.h copy functions
  * ****************************************************************
@@ -3489,6 +3515,12 @@ copyObject(void *from)
                case T_ReassignOwnedStmt:
                        retval = _copyReassignOwnedStmt(from);
                        break;
+               case T_AlterTSDictionaryStmt:
+                       retval = _copyAlterTSDictionaryStmt(from);
+                       break;
+               case T_AlterTSConfigurationStmt:
+                       retval = _copyAlterTSConfigurationStmt(from);
+                       break;
 
                case T_A_Expr:
                        retval = _copyAExpr(from);
index 7bb73702d7019b735a743c5cb524281f8802fa3a..3ff9691b9820b5e23adad10340650a3cc00ca750 100644 (file)
@@ -1637,6 +1637,29 @@ _equalReassignOwnedStmt(ReassignOwnedStmt *a, ReassignOwnedStmt *b)
        return true;
 }
 
+static bool
+_equalAlterTSDictionaryStmt(AlterTSDictionaryStmt *a, AlterTSDictionaryStmt *b)
+{
+       COMPARE_NODE_FIELD(dictname);
+       COMPARE_NODE_FIELD(options);
+
+       return true;
+}
+
+static bool
+_equalAlterTSConfigurationStmt(AlterTSConfigurationStmt *a,
+                                                          AlterTSConfigurationStmt *b)
+{
+       COMPARE_NODE_FIELD(cfgname);
+       COMPARE_NODE_FIELD(tokentype);
+       COMPARE_NODE_FIELD(dicts);
+       COMPARE_SCALAR_FIELD(override);
+       COMPARE_SCALAR_FIELD(replace);
+       COMPARE_SCALAR_FIELD(missing_ok);
+
+       return true;
+}
+
 static bool
 _equalAExpr(A_Expr *a, A_Expr *b)
 {
@@ -2415,10 +2438,15 @@ equal(void *a, void *b)
                case T_DropOwnedStmt:
                        retval = _equalDropOwnedStmt(a, b);
                        break;
-
                case T_ReassignOwnedStmt:
                        retval = _equalReassignOwnedStmt(a, b);
                        break;
+               case T_AlterTSDictionaryStmt:
+                       retval = _equalAlterTSDictionaryStmt(a, b);
+                       break;
+               case T_AlterTSConfigurationStmt:
+                       retval = _equalAlterTSConfigurationStmt(a, b);
+                       break;
 
                case T_A_Expr:
                        retval = _equalAExpr(a, b);