mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
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
This commit is contained in:
@@ -3270,6 +3270,17 @@ _copyRefreshMatViewStmt(const RefreshMatViewStmt *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static ReplicaIdentityStmt *
|
||||
_copyReplicaIdentityStmt(const ReplicaIdentityStmt *from)
|
||||
{
|
||||
ReplicaIdentityStmt *newnode = makeNode(ReplicaIdentityStmt);
|
||||
|
||||
COPY_SCALAR_FIELD(identity_type);
|
||||
COPY_STRING_FIELD(name);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static CreateSeqStmt *
|
||||
_copyCreateSeqStmt(const CreateSeqStmt *from)
|
||||
{
|
||||
@@ -4343,6 +4354,9 @@ copyObject(const void *from)
|
||||
case T_RefreshMatViewStmt:
|
||||
retval = _copyRefreshMatViewStmt(from);
|
||||
break;
|
||||
case T_ReplicaIdentityStmt:
|
||||
retval = _copyReplicaIdentityStmt(from);
|
||||
break;
|
||||
case T_CreateSeqStmt:
|
||||
retval = _copyCreateSeqStmt(from);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user