1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +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

@ -2793,7 +2793,7 @@ CopyFrom(CopyState cstate)
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot perform FREEZE on a partitioned table")));
errmsg("cannot perform COPY FREEZE on a partitioned table")));
}
/*
@ -2808,13 +2808,13 @@ CopyFrom(CopyState cstate)
if (!ThereAreNoPriorRegisteredSnapshots() || !ThereAreNoReadyPortals())
ereport(ERROR,
(errcode(ERRCODE_INVALID_TRANSACTION_STATE),
errmsg("cannot perform FREEZE because of prior transaction activity")));
errmsg("cannot perform COPY FREEZE because of prior transaction activity")));
if (cstate->rel->rd_createSubid != GetCurrentSubTransactionId() &&
cstate->rel->rd_newRelfilenodeSubid != GetCurrentSubTransactionId())
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("cannot perform FREEZE because the table was not created or truncated in the current subtransaction")));
errmsg("cannot perform COPY FREEZE because the table was not created or truncated in the current subtransaction")));
ti_options |= TABLE_INSERT_FROZEN;
}