aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/catalog/pg_publication.c4
-rw-r--r--src/backend/commands/publicationcmds.c8
-rw-r--r--src/backend/parser/gram.y18
-rw-r--r--src/backend/replication/pgoutput/pgoutput.c3
4 files changed, 16 insertions, 17 deletions
diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index c365de3a72a..7d1c30632a6 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -837,7 +837,7 @@ GetAllTablesPublicationRelations(bool pubviaroot)
/*
* Gets the list of schema oids for a publication.
*
- * This should only be used FOR ALL TABLES IN SCHEMA publications.
+ * This should only be used FOR TABLES IN SCHEMA publications.
*/
List *
GetPublicationSchemas(Oid pubid)
@@ -957,7 +957,7 @@ GetSchemaPublicationRelations(Oid schemaid, PublicationPartOpt pub_partopt)
}
/*
- * Gets the list of all relations published by FOR ALL TABLES IN SCHEMA
+ * Gets the list of all relations published by FOR TABLES IN SCHEMA
* publication.
*/
List *
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 89a005540f6..50f5c75266c 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -847,11 +847,11 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
ObjectsInPublicationToOids(stmt->pubobjects, pstate, &relations,
&schemaidlist);
- /* FOR ALL TABLES IN SCHEMA requires superuser */
- if (list_length(schemaidlist) > 0 && !superuser())
+ /* FOR TABLES IN SCHEMA requires superuser */
+ if (schemaidlist != NIL && !superuser())
ereport(ERROR,
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("must be superuser to create FOR ALL TABLES IN SCHEMA publication"));
+ errmsg("must be superuser to create FOR TABLES IN SCHEMA publication"));
if (list_length(relations) > 0)
{
@@ -1979,7 +1979,7 @@ AlterPublicationOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId)
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("permission denied to change owner of publication \"%s\"",
NameStr(form->pubname)),
- errhint("The owner of a FOR ALL TABLES IN SCHEMA publication must be a superuser.")));
+ errhint("The owner of a FOR TABLES IN SCHEMA publication must be a superuser.")));
}
form->pubowner = newOwnerId;
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index e25b9a85e33..fe04db6d330 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10303,7 +10303,7 @@ AlterOwnerStmt: ALTER AGGREGATE aggregate_with_argtypes OWNER TO RoleSpec
* pub_obj is one of:
*
* TABLE table [, ...]
- * ALL TABLES IN SCHEMA schema [, ...]
+ * TABLES IN SCHEMA schema [, ...]
*
*****************************************************************************/
@@ -10338,7 +10338,7 @@ CreatePublicationStmt:
;
/*
- * FOR TABLE and FOR ALL TABLES IN SCHEMA specifications
+ * FOR TABLE and FOR TABLES IN SCHEMA specifications
*
* This rule parses publication objects with and without keyword prefixes.
*
@@ -10360,18 +10360,18 @@ PublicationObjSpec:
$$->pubtable->columns = $3;
$$->pubtable->whereClause = $4;
}
- | ALL TABLES IN_P SCHEMA ColId
+ | TABLES IN_P SCHEMA ColId
{
$$ = makeNode(PublicationObjSpec);
$$->pubobjtype = PUBLICATIONOBJ_TABLES_IN_SCHEMA;
- $$->name = $5;
- $$->location = @5;
+ $$->name = $4;
+ $$->location = @4;
}
- | ALL TABLES IN_P SCHEMA CURRENT_SCHEMA
+ | TABLES IN_P SCHEMA CURRENT_SCHEMA
{
$$ = makeNode(PublicationObjSpec);
$$->pubobjtype = PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA;
- $$->location = @5;
+ $$->location = @4;
}
| ColId opt_column_list OptWhereClause
{
@@ -10447,7 +10447,7 @@ pub_obj_list: PublicationObjSpec
* pub_obj is one of:
*
* TABLE table_name [, ...]
- * ALL TABLES IN SCHEMA schema_name [, ...]
+ * TABLES IN SCHEMA schema_name [, ...]
*
*****************************************************************************/
@@ -18431,7 +18431,7 @@ preprocess_pubobj_list(List *pubobjspec_list, core_yyscan_t yyscanner)
ereport(ERROR,
errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid publication object list"),
- errdetail("One of TABLE or ALL TABLES IN SCHEMA must be specified before a standalone table or schema name."),
+ errdetail("One of TABLE or TABLES IN SCHEMA must be specified before a standalone table or schema name."),
parser_errposition(pubobj->location));
foreach(cell, pubobjspec_list)
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index 8deae571433..bb6580fa717 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -995,8 +995,7 @@ pgoutput_column_list_init(PGOutputData *data, List *publications,
* need to check all the given publication-table mappings and report an
* error if any publications have a different column list.
*
- * FOR ALL TABLES and FOR ALL TABLES IN SCHEMA implies "don't use column
- * list".
+ * FOR ALL TABLES and FOR TABLES IN SCHEMA imply "don't use column list".
*/
foreach(lc, publications)
{