mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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:
@@ -3114,6 +3114,14 @@ _equalValue(const Value *a, const Value *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalPublicationTable(const PublicationTable *a, const PublicationTable *b)
|
||||
{
|
||||
COMPARE_NODE_FIELD(relation);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* equal
|
||||
* returns whether two nodes are equal
|
||||
@@ -3862,6 +3870,9 @@ equal(const void *a, const void *b)
|
||||
case T_PartitionCmd:
|
||||
retval = _equalPartitionCmd(a, b);
|
||||
break;
|
||||
case T_PublicationTable:
|
||||
retval = _equalPublicationTable(a, b);
|
||||
break;
|
||||
|
||||
default:
|
||||
elog(ERROR, "unrecognized node type: %d",
|
||||
|
Reference in New Issue
Block a user