diff options
| author | Tom Lane | 2008-02-07 20:19:47 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-02-07 20:19:47 +0000 |
| commit | 49a730128c50fc6d5031001a26730caff0b0ea4b (patch) | |
| tree | 711ac97feca1b7664e5fcd92bfea20a3b21ea52b | |
| parent | 1f6fc49ce3bed65c3e6f12eb9cb4d677e7bb6e3a (diff) | |
Add missing copyfuncs/equalfuncs support for AlterTSDictionaryStmt and
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.
| -rw-r--r-- | src/backend/nodes/copyfuncs.c | 34 | ||||
| -rw-r--r-- | src/backend/nodes/equalfuncs.c | 32 |
2 files changed, 63 insertions, 3 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index a0128d0a0c3..e9df49bab9c 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.387 2008/01/01 19:45:50 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.388 2008/02/07 20:19:47 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -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); diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index ffa4b7af02a..57c51b2c73f 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.317 2008/01/01 19:45:50 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.318 2008/02/07 20:19:47 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1638,6 +1638,29 @@ _equalReassignOwnedStmt(ReassignOwnedStmt *a, ReassignOwnedStmt *b) } 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) { COMPARE_SCALAR_FIELD(kind); @@ -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); |
