8000 Message wording improvements · postgrespro/postgres@e53a611 · GitHub
[go: up one dir, main page]

Skip to content

Commit e53a611

Browse files
committed
Message wording improvements
1 parent 9b28685 commit e53a611

File tree

20 files changed

+53
-48
lines changed

20 files changed

+53
-48
lines changed

src/backend/access/common/reloptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ partitioned_table_reloptions(Datum reloptions, bool validate)
19891989
ereport(ERROR,
19901990
errcode(ERRCODE_WRONG_OBJECT_TYPE),
19911991
errmsg("cannot specify storage parameters for a partitioned table"),
1992-
errhint("Specify storage parameters for its leaf partitions, instead."));
1992+
errhint("Specify storage parameters for its leaf partitions instead."));
19931993
return NULL;
19941994
}
19951995

src/backend/backup/basebackup_zstd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ bbsink_zstd_begin_backup(bbsink *sink)
126126
if (ZSTD_isError(ret))
127127
ereport(ERROR,
128128
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
129-
errmsg("could not set compression flag for %s: %s",
130-
"long", ZSTD_getErrorName(ret)));
129+
errmsg("could not enable long-distance mode: %s",
130+
ZSTD_getErrorName(ret)));
131131
}
132132

133133
/*

src/backend/commands/copyfromparse.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,8 +1703,8 @@ CopyReadAttributesText(CopyFromState cstate)
17031703

17041704
ereport(ERROR,
17051705
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
1706-
errmsg("unexpected DEFAULT in COPY data"),
1707-
errdetail("Column \"%s\" has no DEFAULT value.",
1706+
errmsg("unexpected default marker in COPY data"),
1707+
errdetail("Column \"%s\" has no default value.",
17081708
NameStr(att->attname))));
17091709
}
17101710
}
@@ -1918,8 +1918,8 @@ CopyReadAttributesCSV(CopyFromState cstate)
19181918

19191919
ereport(ERROR,
19201920
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
1921-
errmsg("unexpected DEFAULT in COPY data"),
1922-
errdetail("Column \"%s\" has no DEFAULT value.",
1921+
errmsg("unexpected default marker in COPY data"),
1922+
errdetail("Column \"%s\" has no default value.",
19231923
NameStr(att->attname))));
19241924
}
19251925
}

src/backend/commands/tablecmds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10912,7 +10912,7 @@ ATExecAlterConstraint(Relation rel, AlterTableCmd *cmd, bool recurse,
1091210912
ancestorname && ancestortable ?
1091310913
errdetail("Constraint \"%s\" is derived from constraint \"%s\" of relation \"%s\".",
1091410914
cmdcon->conname, ancestorname, ancestortable) : 0,
10915-
errhint("You may alter the constraint it derives from, instead.")));
10915+
errhint("You may alter the constraint it derives from instead.")));
1091610916
}
1091710917

1091810918
/*
@@ -13861,7 +13861,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
1386113861
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1386213862
errmsg("cannot change owner of index \"%s\"",
1386313863
NameStr(tuple_class->relname)),
13864-
errhint("Change the ownership of the index's table, instead.")));
13864+
errhint("Change the ownership of the index's table instead.")));
1386513865
/* quick hack to exit via the no-op path */
1386613866
newOwnerI 10000 d = tuple_class->relowner;
1386713867
}
@@ -13873,7 +13873,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
1387313873
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
1387413874
errmsg("cannot change owner of index \"%s\"",
1387513875
NameStr(tuple_class->relname)),
13876-
errhint("Change the ownership of the index's table, instead.")));
13876+
errhint("Change the ownership of the index's table instead.")));
1387713877
break;
1387813878
case RELKIND_SEQUENCE:
1387913879
if (!recursing &&

src/backend/libpq/auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ auth_failed(Port *port, int status, const char *logdetail)
312312
break;
313313
}
314314

315-
cdetail = psprintf(_("Connection matched %s line %d: \"%s\""),
315+
cdetail = psprintf(_("Connection matched file \"%s\" line %d: \"%s\""),
316316
port->hba->sourcefile, port->hba->linenumber,
317317
port->hba->rawline);
318318
if (logdetail)

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ libpqrcv_connect(const char *conninfo, bool logical, bool must_use_password,
196196
(errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
197197
errmsg("password is required"),
198198
errdetail("Non-superuser cannot connect if the server does not request a password."),
199-
errhint("Target server's authentication method must be changed. or set password_required=false in the subscription attributes.")));
199+
errhint("Target server's authentication method must be changed, or set password_required=false in the subscription parameters.")));
200200
}
201201

202202
if (logical)

src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
11131113
if (!XactReadOnly)
11141114
ereport(ERROR,
11151115
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
1116-
(errmsg("%s must be called in a read only transaction",
1116+
(errmsg("%s must be called in a read-only transaction",
11171117
"CREATE_REPLICATION_SLOT ... (SNAPSHOT 'use')")));
11181118

11191119
if (FirstSnapshotSet)

src/backend/storage/ipc/procarray.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3825,7 +3825,9 @@ TerminateOtherDBBackends(Oid databaseId)
38253825
if (superuser_arg(proc->roleId) && !superuser())
38263826
ereport(ERROR,
38273827
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
3828-
errmsg("must be a superuser to terminate superuser process")));
3828+
errmsg("permission denied to terminate process"),
3829+
errdetail("Only roles with the %s attribute may terminate processes of roles with the %s attribute.",
3830+
"SUPERUSER", "SUPERUSER")));
38293831

38303832
/* Users can signal backends they have role membership in. */
38313833
if (!has_privs_of_role(GetUserId(), proc->roleId) &&

src/backend/tcop/postgres.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2527,7 +2527,7 @@ errdetail_recovery_conflict(void)
25272527
errdetail("User query might have needed to see row versions that must be removed.");
25282528
break;
25292529
case PROCSIG_RECOVERY_CONFLICT_LOGICALSLOT:
2530-
errdetail("User was using a logical slot that must be invalidated.");
2530+
errdetail("User was using a logical replication slot that must be invalidated.");
25312531
break;
25322532
case PROCSIG_RECOVERY_CONFLICT_STARTUP_DEADLOCK:
25332533
errdetail("User transaction caused buffer deadlock with recovery.");

src/backend/tcop/utility.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ standard_ProcessUtility(PlannedStmt *pstmt,
950950
if (!has_privs_of_role(GetUserId(), ROLE_PG_CHECKPOINT))
951951
ereport(ERROR,
952952
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
953+
/* translator: %s is name of a SQL command, eg CHECKPOINT */
953954
errmsg("permission denied to execute %s command",
954955
"CHECKPOINT"),
955956
errdetail("Only roles with privileges of the \"%s\" role may execute this command.",

0 commit comments

Comments
 (0)
0