Some message fixes - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Some message fixes
Date
Msg-id 20180307.163428.209919771.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
Responses Re: Some message fixes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hello.

While translating message catalogs, I found that some messages
listing object names are missing partitioned tables/indices.
And GUC comment for autovacuum_work_mem has a typo.

1. some messages are missing partitioned table/index

  The first attached. I'm not sure how the orering ought to be
  but I arranged them in mainly in the appearance order in if()
  conditions, or the order of case label in switch()
  construct. One exception is ATExecChangeOwner, in which the
  order is the others regardless of the case label order just
  above.

  This is backpatchable to 10 but 10 doesn't have partitioned
  index so needs a different fix (Second attached).

  # But, I'm not sure if the list may be that long...

2. GUC comment for autovacuum_work_mem has a typo, "max num of
   parallel workers *than* can be..". (Third attached)

regards,  

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index 2f2e69b4a8..37b88b35ea 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -98,7 +98,7 @@ CommentObject(CommentStmt *stmt)
                 relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
                 ereport(ERROR,
                         (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                         errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
+                         errmsg("\"%s\" is not a table, view, materialized view, composite type, foreign table, or
partitionedtable",
 
                                 RelationGetRelationName(relation))));
             break;
         default:
diff --git a/src/backend/commands/seclabel.c b/src/backend/commands/seclabel.c
index 5ee46905d8..06f99efaf9 100644
--- a/src/backend/commands/seclabel.c
+++ b/src/backend/commands/seclabel.c
@@ -114,7 +114,7 @@ ExecSecLabelStmt(SecLabelStmt *stmt)
                 relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
                 ereport(ERROR,
                         (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                         errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
+                         errmsg("\"%s\" is not a table, view, materialized view, composite type, foreign table, or
partitionedtable",
 
                                 RelationGetRelationName(relation))));
             break;
         default:
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index ef3ca8c00b..932237477d 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -1671,7 +1671,7 @@ process_owned_by(Relation seqrel, List *owned_by, bool for_identity)
               tablerel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE))
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("referenced relation \"%s\" is not a table or foreign table",
+                     errmsg("referenced relation \"%s\" is not a table, foreign table, view, or partitioned table",
                             RelationGetRelationName(tablerel))));
 
         /* We insist on same owner and schema */
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index c4adfd569e..c254bd33fe 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -117,7 +117,7 @@ CreateStatistics(CreateStatsStmt *stmt)
             rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("relation \"%s\" is not a table, foreign table, or materialized view",
+                     errmsg("relation \"%s\" is not a table, foreign table, materialized view, foreign table, or
partitionedtable",
 
                             RelationGetRelationName(rel))));
 
         /* You must own the relation to create stats on it */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 74e020bffc..fce9208319 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -1889,7 +1889,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence,
             relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("inherited relation \"%s\" is not a table or foreign table",
+                     errmsg("inherited relation \"%s\" is not a table, foreign table, or partitioned table",
                             parent->relname)));
         /* Permanent rels cannot inherit from temporary ones */
         if (relpersistence != RELPERSISTENCE_TEMP &&
@@ -2596,7 +2596,7 @@ renameatt_check(Oid myrelid, Form_pg_class classform, bool recursing)
         relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, materialized view, composite type, index, or foreign table",
+                 errmsg("\"%s\" is not a table, view, materialized view, composite type, index, partitioned index,
foreigntable, or partitioned table",
 
                         NameStr(classform->relname))));
 
     /*
@@ -6285,7 +6285,7 @@ ATPrepSetStatistics(Relation rel, const char *colName, int16 colNum, Node *newVa
         rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, materialized view, index, or foreign table",
+                 errmsg("\"%s\" is not a table, materialized view, index, partitioned index, foreign table, or
partitionedtable",
 
                         RelationGetRelationName(rel))));
 
     /*
@@ -10129,7 +10129,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
         default:
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("\"%s\" is not a table, view, sequence, or foreign table",
+                     errmsg("\"%s\" is not a table, index, view, materialized view, composite type, sequence, foreign
table,partitioned table, or partitioned index",
 
                             NameStr(tuple_class->relname))));
     }
 
@@ -13346,7 +13346,7 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
         relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, materialized view, sequence, or foreign table",
+                 errmsg("\"%s\" is not a table, view, materialized view, sequence, foreign table, or partitioned
table",
                         rv->relname)));
 
     ReleaseSysCache(tuple);
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index fbd176b5d0..0a25a2a9b2 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -1311,7 +1311,7 @@ RemoveTriggerById(Oid trigOid)
         rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, or foreign table",
+                 errmsg("\"%s\" is not a table, view, foreign table, or partitioned table",
                         RelationGetRelationName(rel))));
 
     if (!allowSystemTableMods && IsSystemRelation(rel))
@@ -1417,7 +1417,7 @@ RangeVarCallbackForRenameTrigger(const RangeVar *rv, Oid relid, Oid oldrelid,
         form->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, or foreign table",
+                 errmsg("\"%s\" is not a table, view, foreign table, or partitioned table",
                         rv->relname)));
 
     /* you must own the table to rename one of its triggers */
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 0fd14f43c6..500823ab87 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -933,7 +933,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
         relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
+                 errmsg("\"%s\" is not a table, view, materialized view, composite type, foreign table, or partitioned
table",
                         RelationGetRelationName(relation))));
 
     cancel_parser_errposition_callback(&pcbstate);
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index 1c17927c49..fead1fe6c9 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -98,7 +98,7 @@ CommentObject(CommentStmt *stmt)
                 relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
                 ereport(ERROR,
                         (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                         errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
+                         errmsg("\"%s\" is not a table, view, materialized view, composite type, foreign table, or
partitionedtable",
 
                                 RelationGetRelationName(relation))));
             break;
         default:
diff --git a/src/backend/commands/seclabel.c b/src/backend/commands/seclabel.c
index 5f16d6cf1c..74ef5f1004 100644
--- a/src/backend/commands/seclabel.c
+++ b/src/backend/commands/seclabel.c
@@ -114,7 +114,7 @@ ExecSecLabelStmt(SecLabelStmt *stmt)
                 relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
                 ereport(ERROR,
                         (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                         errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
+                         errmsg("\"%s\" is not a table, view, materialized view, composite type, foreign table, or
partitionedtable",
 
                                 RelationGetRelationName(relation))));
             break;
         default:
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 5c2ce78946..a3e8f71738 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -1679,7 +1679,7 @@ process_owned_by(Relation seqrel, List *owned_by, bool for_identity)
               tablerel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE))
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("referenced relation \"%s\" is not a table or foreign table",
+                     errmsg("referenced relation \"%s\" is not a table, foreign table, view, or partitioned table",
                             RelationGetRelationName(tablerel))));
 
         /* We insist on same owner and schema */
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c
index 1a98905098..4f9ad547ae 100644
--- a/src/backend/commands/statscmds.c
+++ b/src/backend/commands/statscmds.c
@@ -116,7 +116,7 @@ CreateStatistics(CreateStatsStmt *stmt)
             rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("relation \"%s\" is not a table, foreign table, or materialized view",
+                     errmsg("relation \"%s\" is not a table, foreign table, materialized view, foreign table, or
partitionedtable",
 
                             RelationGetRelationName(rel))));
 
         /* You must own the relation to create stats on it */
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 7ea5c4983c..66d3fecb15 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -1771,7 +1771,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence,
             relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("inherited relation \"%s\" is not a table or foreign table",
+                     errmsg("inherited relation \"%s\" is not a table, foreign table, or partitioned table",
                             parent->relname)));
         /* Permanent rels cannot inherit from temporary ones */
         if (relpersistence != RELPERSISTENCE_TEMP &&
@@ -2492,7 +2492,7 @@ renameatt_check(Oid myrelid, Form_pg_class classform, bool recursing)
         relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, materialized view, composite type, index, or foreign table",
+                 errmsg("\"%s\" is not a table, view, materialized view, composite type, index, foreign table, or
partitionedtable",
 
                         NameStr(classform->relname))));
 
     /*
@@ -6136,7 +6136,7 @@ ATPrepSetStatistics(Relation rel, const char *colName, Node *newValue, LOCKMODE
         rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, materialized view, index, or foreign table",
+                 errmsg("\"%s\" is not a table, materialized view, index, foreign table, or partitioned table",
                         RelationGetRelationName(rel))));
 
     /* Permissions checks */
@@ -9920,7 +9920,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
         default:
             ereport(ERROR,
                     (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                     errmsg("\"%s\" is not a table, view, sequence, or foreign table",
+                     errmsg("\"%s\" is not a table, index, view, materialized view, composite type, sequence, foreign
table,or partitioned table",
 
                             NameStr(tuple_class->relname))));
     }
 
@@ -13155,7 +13155,7 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
         relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, materialized view, sequence, or foreign table",
+                 errmsg("\"%s\" is not a table, view, materialized view, sequence, foreign table, or partitioned
table",
                         rv->relname)));
 
     ReleaseSysCache(tuple);
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 2886aebef4..c41197a5db 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -1311,7 +1311,7 @@ RemoveTriggerById(Oid trigOid)
         rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, or foreign table",
+                 errmsg("\"%s\" is not a table, view, foreign table, or partitioned table",
                         RelationGetRelationName(rel))));
 
     if (!allowSystemTableMods && IsSystemRelation(rel))
@@ -1417,7 +1417,7 @@ RangeVarCallbackForRenameTrigger(const RangeVar *rv, Oid relid, Oid oldrelid,
         form->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, or foreign table",
+                 errmsg("\"%s\" is not a table, view, foreign table, or partitioned table",
                         rv->relname)));
 
     /* you must own the table to rename one of its triggers */
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index b3367f0cd4..ec4fd4ac66 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -960,7 +960,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
         relation->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
         ereport(ERROR,
                 (errcode(ERRCODE_WRONG_OBJECT_TYPE),
-                 errmsg("\"%s\" is not a table, view, materialized view, composite type, or foreign table",
+                 errmsg("\"%s\" is not a table, view, materialized view, composite type, foreign table, or partitioned
table",
                         RelationGetRelationName(relation))));
 
     cancel_parser_errposition_callback(&pcbstate);
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 1db7845d5a..0c4cc9160d 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2756,7 +2756,7 @@ static struct config_int ConfigureNamesInt[] =
 
     {
         {"max_parallel_workers", PGC_USERSET, RESOURCES_ASYNCHRONOUS,
-            gettext_noop("Sets the maximum number of parallel workers than can be active at one time."),
+            gettext_noop("Sets the maximum number of parallel workers that can be active at one time."),
             NULL
         },
         &max_parallel_workers,

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: public schema default ACL
Next
From: Andrey Borodin
Date:
Subject: Re: 2018-03 CFM