1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

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 <rahilasyed90@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAH2L28vddB_NFdRVpuyRBJEBWjz4BSyTB=_ektNRH8NJ1jf95g@mail.gmail.com
This commit is contained in:
Alvaro Herrera
2021-09-06 14:24:50 -03:00
parent 89dba59590
commit 0c6828fa98
9 changed files with 95 additions and 31 deletions

View File

@ -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