1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Message style improvements

This commit is contained in:
Peter Eisentraut
2006-10-06 17:14:01 +00:00
parent 378c79dc78
commit b9b4f10b5b
31 changed files with 115 additions and 114 deletions

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gin/ginarrayproc.c,v 1.6 2006/10/04 00:29:47 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/gin/ginarrayproc.c,v 1.7 2006/10/06 17:13:58 petere Exp $
*-------------------------------------------------------------------------
*/
#include "postgres.h"
@@ -27,7 +27,7 @@
if ( ARR_HASNULL(x) ) \
ereport(ERROR, \
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), \
errmsg("array must not contain nulls"))); \
errmsg("array must not contain null values"))); \
} while(0)

View File

@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.6 2006/10/04 00:29:48 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.7 2006/10/06 17:13:58 petere Exp $
*-------------------------------------------------------------------------
*/
@@ -176,7 +176,7 @@ newScanKey(IndexScanDesc scan)
if (so->nkeys == 0)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("GIN index doesn't support search with void query")));
errmsg("GIN index does not support search with void query")));
pgstat_count_index_scan(&scan->xs_pgstat_info);
}

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.24 2006/10/04 00:29:49 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.25 2006/10/06 17:13:58 petere Exp $
*
* NOTES
* Each global transaction is associated with a global transaction
@@ -866,7 +866,7 @@ EndPrepare(GlobalTransaction gxact)
if (fd < 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not create twophase state file \"%s\": %m",
errmsg("could not create two-phase state file \"%s\": %m",
path)));
/* Write data to file, and calculate CRC as we pass over it */
@@ -880,7 +880,7 @@ EndPrepare(GlobalTransaction gxact)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write twophase state file: %m")));
errmsg("could not write two-phase state file: %m")));
}
}
@@ -897,7 +897,7 @@ EndPrepare(GlobalTransaction gxact)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write twophase state file: %m")));
errmsg("could not write two-phase state file: %m")));
}
/* Back up to prepare for rewriting the CRC */
@@ -906,7 +906,7 @@ EndPrepare(GlobalTransaction gxact)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not seek in twophase state file: %m")));
errmsg("could not seek in two-phase state file: %m")));
}
/*
@@ -946,13 +946,13 @@ EndPrepare(GlobalTransaction gxact)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write twophase state file: %m")));
errmsg("could not write two-phase state file: %m")));
}
if (close(fd) != 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not close twophase state file: %m")));
errmsg("could not close two-phase state file: %m")));
/*
* Mark the prepared transaction as valid. As soon as xact.c marks MyProc
@@ -1022,7 +1022,7 @@ ReadTwoPhaseFile(TransactionId xid)
{
ereport(WARNING,
(errcode_for_file_access(),
errmsg("could not open twophase state file \"%s\": %m",
errmsg("could not open two-phase state file \"%s\": %m",
path)));
return NULL;
}
@@ -1036,7 +1036,7 @@ ReadTwoPhaseFile(TransactionId xid)
close(fd);
ereport(WARNING,
(errcode_for_file_access(),
errmsg("could not stat twophase state file \"%s\": %m",
errmsg("could not stat two-phase state file \"%s\": %m",
path)));
return NULL;
}
@@ -1067,7 +1067,7 @@ ReadTwoPhaseFile(TransactionId xid)
close(fd);
ereport(WARNING,
(errcode_for_file_access(),
errmsg("could not read twophase state file \"%s\": %m",
errmsg("could not read two-phase state file \"%s\": %m",
path)));
pfree(buf);
return NULL;
@@ -1128,7 +1128,7 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
if (buf == NULL)
ereport(ERROR,
(errcode(ERRCODE_DATA_CORRUPTED),
errmsg("twophase state file for transaction %u is corrupt",
errmsg("two-phase state file for transaction %u is corrupt",
xid)));
/*
@@ -1250,7 +1250,7 @@ RemoveTwoPhaseFile(TransactionId xid, bool giveWarning)
if (errno != ENOENT || giveWarning)
ereport(WARNING,
(errcode_for_file_access(),
errmsg("could not remove twophase state file \"%s\": %m",
errmsg("could not remove two-phase state file \"%s\": %m",
path)));
}
@@ -1279,7 +1279,7 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
if (fd < 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not recreate twophase state file \"%s\": %m",
errmsg("could not recreate two-phase state file \"%s\": %m",
path)));
/* Write content and CRC */
@@ -1288,14 +1288,14 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write twophase state file: %m")));
errmsg("could not write two-phase state file: %m")));
}
if (write(fd, &statefile_crc, sizeof(pg_crc32)) != sizeof(pg_crc32))
{
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not write twophase state file: %m")));
errmsg("could not write two-phase state file: %m")));
}
/*
@@ -1307,13 +1307,13 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not fsync twophase state file: %m")));
errmsg("could not fsync two-phase state file: %m")));
}
if (close(fd) != 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not close twophase state file: %m")));
errmsg("could not close two-phase state file: %m")));
}
/*
@@ -1390,7 +1390,7 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
}
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not open twophase state file \"%s\": %m",
errmsg("could not open two-phase state file \"%s\": %m",
path)));
}
@@ -1399,14 +1399,14 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
close(fd);
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not fsync twophase state file \"%s\": %m",
errmsg("could not fsync two-phase state file \"%s\": %m",
path)));
}
if (close(fd) != 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not close twophase state file \"%s\": %m",
errmsg("could not close two-phase state file \"%s\": %m",
path)));
}
@@ -1462,7 +1462,7 @@ PrescanPreparedTransactions(void)
if (TransactionIdFollowsOrEquals(xid, origNextXid))
{
ereport(WARNING,
(errmsg("removing future twophase state file \"%s\"",
(errmsg("removing future two-phase state file \"%s\"",
clde->d_name)));
RemoveTwoPhaseFile(xid, true);
continue;
@@ -1478,7 +1478,7 @@ PrescanPreparedTransactions(void)
if (buf == NULL)
{
ereport(WARNING,
(errmsg("removing corrupt twophase state file \"%s\"",
(errmsg("removing corrupt two-phase state file \"%s\"",
clde->d_name)));
RemoveTwoPhaseFile(xid, true);
continue;
@@ -1489,7 +1489,7 @@ PrescanPreparedTransactions(void)
if (!TransactionIdEquals(hdr->xid, xid))
{
ereport(WARNING,
(errmsg("removing corrupt twophase state file \"%s\"",
(errmsg("removing corrupt two-phase state file \"%s\"",
clde->d_name)));
RemoveTwoPhaseFile(xid, true);
pfree(buf);
@@ -1566,7 +1566,7 @@ RecoverPreparedTransactions(void)
if (TransactionIdDidCommit(xid) || TransactionIdDidAbort(xid))
{
ereport(WARNING,
(errmsg("removing stale twophase state file \"%s\"",
(errmsg("removing stale two-phase state file \"%s\"",
clde->d_name)));
RemoveTwoPhaseFile(xid, true);
continue;
@@ -1577,7 +1577,7 @@ RecoverPreparedTransactions(void)
if (buf == NULL)
{
ereport(WARNING,
(errmsg("removing corrupt twophase state file \"%s\"",
(errmsg("removing corrupt two-phase state file \"%s\"",
clde->d_name)));
RemoveTwoPhaseFile(xid, true);
continue;

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.250 2006/10/04 00:29:49 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.251 2006/10/06 17:13:58 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -6421,7 +6421,7 @@ pg_switch_xlog(PG_FUNCTION_ARGS)
if (!superuser())
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("must be superuser to switch xlog files"))));
(errmsg("must be superuser to switch transaction log files"))));
switchpoint = RequestXLogSwitch();
@@ -6529,7 +6529,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
if (sscanf(locationstr, "%X/%X", &uxlogid, &uxrecoff) != 2)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not parse xlog location \"%s\"",
errmsg("could not parse transaction log location \"%s\"",
locationstr)));
locationpoint.xlogid = uxlogid;