1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

More message style fixes

Discussion: https://postgr.es/m/20190515183005.GA26486@alvherre.pgsql
This commit is contained in:
Alvaro Herrera
2019-05-16 18:50:56 -04:00
parent 3f58cc6dd8
commit 75445c1515
12 changed files with 78 additions and 51 deletions

View File

@@ -903,8 +903,9 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
{
if (IsTransactionBlock())
ereport(ERROR,
(errmsg("CREATE_REPLICATION_SLOT ... EXPORT_SNAPSHOT "
"must not be called inside a transaction")));
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
(errmsg("%s must not be called inside a transaction",
"CREATE_REPLICATION_SLOT ... EXPORT_SNAPSHOT")));
need_full_snapshot = true;
}
@@ -912,23 +913,27 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
{
if (!IsTransactionBlock())
ereport(ERROR,
(errmsg("CREATE_REPLICATION_SLOT ... USE_SNAPSHOT "
"must be called inside a transaction")));
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
(errmsg("%s must be called inside a transaction",
"CREATE_REPLICATION_SLOT ... USE_SNAPSHOT")));
if (XactIsoLevel != XACT_REPEATABLE_READ)
ereport(ERROR,
(errmsg("CREATE_REPLICATION_SLOT ... USE_SNAPSHOT "
"must be called in REPEATABLE READ isolation mode transaction")));
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
(errmsg("%s must be called in REPEATABLE READ isolation mode transaction",
"CREATE_REPLICATION_SLOT ... USE_SNAPSHOT")));
if (FirstSnapshotSet)
ereport(ERROR,
(errmsg("CREATE_REPLICATION_SLOT ... USE_SNAPSHOT "
"must be called before any query")));
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
(errmsg("%s must be called before any query",
"CREATE_REPLICATION_SLOT ... USE_SNAPSHOT")));
if (IsSubTransaction())
ereport(ERROR,
(errmsg("CREATE_REPLICATION_SLOT ... USE_SNAPSHOT "
"must not be called in a subtransaction")));
/*- translator: %s is a CREATE_REPLICATION_SLOT statement */
(errmsg("%s must not be called in a subtransaction",
"CREATE_REPLICATION_SLOT ... USE_SNAPSHOT")));
need_full_snapshot = true;
}