diff options
| author | Robert Haas | 2013-11-08 17:30:43 +0000 |
|---|---|---|
| committer | Robert Haas | 2013-11-08 17:30:43 +0000 |
| commit | 07cacba983ef79be4a84fcd0e0ca3b5fcb85dd65 (patch) | |
| tree | 7fa0f7c8d7b765b3e901512faef90759904d047c /src/backend/nodes/equalfuncs.c | |
| parent | b97ee66cc1f9319f7b457e7d8a78aab711da2dda (diff) | |
Add the notion of REPLICA IDENTITY for a table.
Pending patches for logical replication will use this to determine
which columns of a tuple ought to be considered as its candidate key.
Andres Freund, with minor, mostly cosmetic adjustments by me
Diffstat (limited to 'src/backend/nodes/equalfuncs.c')
| -rw-r--r-- | src/backend/nodes/equalfuncs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 4c9b05e1e4d..7b29812b696 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -1538,6 +1538,15 @@ _equalRefreshMatViewStmt(const RefreshMatViewStmt *a, const RefreshMatViewStmt * } static bool +_equalReplicaIdentityStmt(const ReplicaIdentityStmt *a, const ReplicaIdentityStmt *b) +{ + COMPARE_SCALAR_FIELD(identity_type); + COMPARE_STRING_FIELD(name); + + return true; +} + +static bool _equalCreateSeqStmt(const CreateSeqStmt *a, const CreateSeqStmt *b) { COMPARE_NODE_FIELD(sequence); @@ -2813,6 +2822,9 @@ equal(const void *a, const void *b) case T_RefreshMatViewStmt: retval = _equalRefreshMatViewStmt(a, b); break; + case T_ReplicaIdentityStmt: + retval = _equalReplicaIdentityStmt(a, b); + break; case T_CreateSeqStmt: retval = _equalCreateSeqStmt(a, b); break; |
