Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49a7301

Browse files
committed
Add missing copyfuncs/equalfuncs support for AlterTSDictionaryStmt and
AlterTSConfigurationStmt. All utility statement node types are expectedto be supported here, though they do not have to have outfuncs/readfuncssupport. Found by running regression tests with COPY_PARSE_PLAN_TREESenabled.
1 parent1f6fc49 commit49a7301

File tree

2 files changed

+63
-3
lines changed

2 files changed

+63
-3
lines changed

‎src/backend/nodes/copyfuncs.c

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Portions Copyright (c) 1994, Regents of the University of California
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.387 2008/01/0119:45:50 momjian Exp $
18+
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.388 2008/02/07 20:19:47 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -2897,6 +2897,32 @@ _copyReassignOwnedStmt(ReassignOwnedStmt *from)
28972897
returnnewnode;
28982898
}
28992899

2900+
staticAlterTSDictionaryStmt*
2901+
_copyAlterTSDictionaryStmt(AlterTSDictionaryStmt*from)
2902+
{
2903+
AlterTSDictionaryStmt*newnode=makeNode(AlterTSDictionaryStmt);
2904+
2905+
COPY_NODE_FIELD(dictname);
2906+
COPY_NODE_FIELD(options);
2907+
2908+
returnnewnode;
2909+
}
2910+
2911+
staticAlterTSConfigurationStmt*
2912+
_copyAlterTSConfigurationStmt(AlterTSConfigurationStmt*from)
2913+
{
2914+
AlterTSConfigurationStmt*newnode=makeNode(AlterTSConfigurationStmt);
2915+
2916+
COPY_NODE_FIELD(cfgname);
2917+
COPY_NODE_FIELD(tokentype);
2918+
COPY_NODE_FIELD(dicts);
2919+
COPY_SCALAR_FIELD(override);
2920+
COPY_SCALAR_FIELD(replace);
2921+
COPY_SCALAR_FIELD(missing_ok);
2922+
2923+
returnnewnode;
2924+
}
2925+
29002926
/* ****************************************************************
29012927
*pg_list.h copy functions
29022928
* ****************************************************************
@@ -3489,6 +3515,12 @@ copyObject(void *from)
34893515
caseT_ReassignOwnedStmt:
34903516
retval=_copyReassignOwnedStmt(from);
34913517
break;
3518+
caseT_AlterTSDictionaryStmt:
3519+
retval=_copyAlterTSDictionaryStmt(from);
3520+
break;
3521+
caseT_AlterTSConfigurationStmt:
3522+
retval=_copyAlterTSConfigurationStmt(from);
3523+
break;
34923524

34933525
caseT_A_Expr:
34943526
retval=_copyAExpr(from);

‎src/backend/nodes/equalfuncs.c

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Portions Copyright (c) 1994, Regents of the University of California
1919
*
2020
* IDENTIFICATION
21-
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.317 2008/01/0119:45:50 momjian Exp $
21+
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.318 2008/02/07 20:19:47 tgl Exp $
2222
*
2323
*-------------------------------------------------------------------------
2424
*/
@@ -1637,6 +1637,29 @@ _equalReassignOwnedStmt(ReassignOwnedStmt *a, ReassignOwnedStmt *b)
16371637
return true;
16381638
}
16391639

1640+
staticbool
1641+
_equalAlterTSDictionaryStmt(AlterTSDictionaryStmt*a,AlterTSDictionaryStmt*b)
1642+
{
1643+
COMPARE_NODE_FIELD(dictname);
1644+
COMPARE_NODE_FIELD(options);
1645+
1646+
return true;
1647+
}
1648+
1649+
staticbool
1650+
_equalAlterTSConfigurationStmt(AlterTSConfigurationStmt*a,
1651+
AlterTSConfigurationStmt*b)
1652+
{
1653+
COMPARE_NODE_FIELD(cfgname);
1654+
COMPARE_NODE_FIELD(tokentype);
1655+
COMPARE_NODE_FIELD(dicts);
1656+
COMPARE_SCALAR_FIELD(override);
1657+
COMPARE_SCALAR_FIELD(replace);
1658+
COMPARE_SCALAR_FIELD(missing_ok);
1659+
1660+
return true;
1661+
}
1662+
16401663
staticbool
16411664
_equalAExpr(A_Expr*a,A_Expr*b)
16421665
{
@@ -2415,10 +2438,15 @@ equal(void *a, void *b)
24152438
caseT_DropOwnedStmt:
24162439
retval=_equalDropOwnedStmt(a,b);
24172440
break;
2418-
24192441
caseT_ReassignOwnedStmt:
24202442
retval=_equalReassignOwnedStmt(a,b);
24212443
break;
2444+
caseT_AlterTSDictionaryStmt:
2445+
retval=_equalAlterTSDictionaryStmt(a,b);
2446+
break;
2447+
caseT_AlterTSConfigurationStmt:
2448+
retval=_equalAlterTSConfigurationStmt(a,b);
2449+
break;
24222450

24232451
caseT_A_Expr:
24242452
retval=_equalAExpr(a,b);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp