diff options
| author | Alvaro Herrera | 2021-09-06 17:24:50 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2021-09-06 17:24:50 +0000 |
| commit | 0c6828fa987b791744b9c8685aadf1baa21f8977 (patch) | |
| tree | 731b8983b6c1f02c7afa2ffa3fa9773be097418d /src/backend/nodes/copyfuncs.c | |
| parent | 89dba59590fdd03799a47daf8019890d4324fbcf (diff) | |
Add PublicationTable and PublicationRelInfo structs
These encapsulate a relation when referred from replication DDL.
Currently they don't do anything useful (they're just wrappers around
RangeVar and Relation respectively) but in the future they'll be used to
carry column lists.
Extracted from a larger patch by Rahila Syed.
Author: Rahila Syed <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Reviewed-by: Tomas Vondra <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>
Discussion: https://postgr.es/m/CAH2L28vddB_NFdRVpuyRBJEBWjz4BSyTB=_ektNRH8NJ1jf95g@mail.gmail.com
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
| -rw-r--r-- | src/backend/nodes/copyfuncs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 38251c2b8e2..e308de170e9 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -4939,6 +4939,15 @@ _copyForeignKeyCacheInfo(const ForeignKeyCacheInfo *from) return newnode; } +static PublicationTable * +_copyPublicationTable(const PublicationTable *from) +{ + PublicationTable *newnode = makeNode(PublicationTable); + + COPY_NODE_FIELD(relation); + + return newnode; +} /* * copyObjectImpl -- implementation of copyObject(); see nodes/nodes.h @@ -5854,6 +5863,9 @@ copyObjectImpl(const void *from) case T_PartitionCmd: retval = _copyPartitionCmd(from); break; + case T_PublicationTable: + retval = _copyPublicationTable(from); + break; /* * MISCELLANEOUS NODES |
