From 665d1fad99e7b11678b0d5fa24d2898424243cd6 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 19 Jan 2017 12:00:00 -0500 Subject: Logical replication - Add PUBLICATION catalogs and DDL - Add SUBSCRIPTION catalog and DDL - Define logical replication protocol and output plugin - Add logical replication workers From: Petr Jelinek Reviewed-by: Steve Singer Reviewed-by: Andres Freund Reviewed-by: Erik Rijkers Reviewed-by: Peter Eisentraut --- src/include/commands/defrem.h | 1 + src/include/commands/publicationcmds.h | 28 ++++++++++++++++++++++++++++ src/include/commands/subscriptioncmds.h | 27 +++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 src/include/commands/publicationcmds.h create mode 100644 src/include/commands/subscriptioncmds.h (limited to 'src/include/commands') diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 6eb4f95fdd..558a91d06f 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -154,5 +154,6 @@ extern int64 defGetInt64(DefElem *def); extern List *defGetQualifiedName(DefElem *def); extern TypeName *defGetTypeName(DefElem *def); extern int defGetTypeLength(DefElem *def); +extern List *defGetStringList(DefElem *def); #endif /* DEFREM_H */ diff --git a/src/include/commands/publicationcmds.h b/src/include/commands/publicationcmds.h new file mode 100644 index 0000000000..2307cea070 --- /dev/null +++ b/src/include/commands/publicationcmds.h @@ -0,0 +1,28 @@ +/*------------------------------------------------------------------------- + * + * publicationcmds.h + * prototypes for publicationcmds.c. + * + * + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/commands/publicationcmds.h + * + *------------------------------------------------------------------------- + */ + +#ifndef PUBLICATIONCMDS_H +#define PUBLICATIONCMDS_H + +#include "nodes/parsenodes.h" + +extern ObjectAddress CreatePublication(CreatePublicationStmt *stmt); +extern void AlterPublication(AlterPublicationStmt *stmt); +extern void RemovePublicationById(Oid pubid); +extern void RemovePublicationRelById(Oid proid); + +extern ObjectAddress AlterPublicationOwner(const char *name, Oid newOwnerId); +extern void AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId); + +#endif /* PUBLICATIONCMDS_H */ diff --git a/src/include/commands/subscriptioncmds.h b/src/include/commands/subscriptioncmds.h new file mode 100644 index 0000000000..1d8e2aa412 --- /dev/null +++ b/src/include/commands/subscriptioncmds.h @@ -0,0 +1,27 @@ +/*------------------------------------------------------------------------- + * + * subscriptioncmds.h + * prototypes for subscriptioncmds.c. + * + * + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/commands/subscriptioncmds.h + * + *------------------------------------------------------------------------- + */ + +#ifndef SUBSCRIPTIONCMDS_H +#define SUBSCRIPTIONCMDS_H + +#include "nodes/parsenodes.h" + +extern ObjectAddress CreateSubscription(CreateSubscriptionStmt *stmt); +extern ObjectAddress AlterSubscription(AlterSubscriptionStmt *stmt); +extern void DropSubscription(DropSubscriptionStmt *stmt); + +extern ObjectAddress AlterSubscriptionOwner(const char *name, Oid newOwnerId); +extern void AlterSubscriptionOwner_oid(Oid subid, Oid newOwnerId); + +#endif /* SUBSCRIPTIONCMDS_H */ -- cgit v1.2.3