mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
More message editing, some suggested by Alvaro Herrera
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
* formatting.c
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.68 2003/09/03 14:59:41 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.69 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*
|
||||
* Portions Copyright (c) 1999-2003, PostgreSQL Global Development Group
|
||||
@@ -3163,7 +3163,7 @@ do_to_timestamp(text *date_txt, text *fmt,
|
||||
if (!tm->tm_year)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
|
||||
errmsg("cannot convert yday without year information")));
|
||||
errmsg("cannot calculate day of year without year information")));
|
||||
|
||||
y = ysum[isleap(tm->tm_year)];
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.81 2003/09/25 06:58:03 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.82 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -312,7 +312,7 @@ path_encode(bool closed, int npts, Point *pt)
|
||||
if (!pair_encode(pt->x, pt->y, cp))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("could not format path")));
|
||||
errmsg("could not format \"path\" value")));
|
||||
|
||||
cp += strlen(cp);
|
||||
*cp++ = RDELIM;
|
||||
@@ -1386,7 +1386,7 @@ path_recv(PG_FUNCTION_ARGS)
|
||||
if (npts < 0 || npts >= (int32) (INT_MAX / sizeof(Point)))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid number of points in external path")));
|
||||
errmsg("invalid number of points in external \"path\" value")));
|
||||
|
||||
size = offsetof(PATH, p[0]) +sizeof(path->p[0]) * npts;
|
||||
path = (PATH *) palloc(size);
|
||||
@@ -3415,7 +3415,7 @@ poly_recv(PG_FUNCTION_ARGS)
|
||||
if (npts < 0 || npts >= (int32) ((INT_MAX - offsetof(POLYGON, p[0])) / sizeof(Point)))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid number of points in external polygon")));
|
||||
errmsg("invalid number of points in external \"polygon\" value")));
|
||||
|
||||
size = offsetof(POLYGON, p[0]) +sizeof(poly->p[0]) * npts;
|
||||
poly = (POLYGON *) palloc0(size); /* zero any holes */
|
||||
@@ -4274,7 +4274,7 @@ circle_out(PG_FUNCTION_ARGS)
|
||||
if (!pair_encode(circle->center.x, circle->center.y, cp))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("could not format circle")));
|
||||
errmsg("could not format \"circle\" value")));
|
||||
|
||||
cp += strlen(cp);
|
||||
*cp++ = RDELIM;
|
||||
@@ -4282,7 +4282,7 @@ circle_out(PG_FUNCTION_ARGS)
|
||||
if (!single_encode(circle->radius, cp))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("could not format circle")));
|
||||
errmsg("could not format \"circle\" value")));
|
||||
|
||||
cp += strlen(cp);
|
||||
*cp++ = RDELIM_C;
|
||||
@@ -4309,7 +4309,7 @@ circle_recv(PG_FUNCTION_ARGS)
|
||||
if (circle->radius < 0)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid radius in external circle")));
|
||||
errmsg("invalid radius in external \"circle\" value")));
|
||||
|
||||
PG_RETURN_CIRCLE_P(circle);
|
||||
}
|
||||
@@ -4803,7 +4803,7 @@ circle_poly(PG_FUNCTION_ARGS)
|
||||
if (FPzero(circle->radius))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot convert zero-size circle to polygon")));
|
||||
errmsg("cannot convert circle with radius zero to polygon")));
|
||||
|
||||
if (npts < 2)
|
||||
ereport(ERROR,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PostgreSQL type definitions for MAC addresses.
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.31 2003/09/25 06:58:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.32 2003/09/29 00:05:25 petere Exp $
|
||||
*/
|
||||
|
||||
#include "postgres.h"
|
||||
@@ -69,7 +69,7 @@ macaddr_in(PG_FUNCTION_ARGS)
|
||||
(e < 0) || (e > 255) || (f < 0) || (f > 255))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
|
||||
errmsg("invalid octet value in macaddr: \"%s\"", str)));
|
||||
errmsg("invalid octet value in \"macaddr\" value: \"%s\"", str)));
|
||||
|
||||
result = (macaddr *) palloc(sizeof(macaddr));
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.116 2003/09/25 06:58:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.117 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -942,7 +942,7 @@ tintervalrecv(PG_FUNCTION_ARGS)
|
||||
interval->status == T_INTERVAL_VALID))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid status in external tinterval")));
|
||||
errmsg("invalid status in external \"tinterval\" value")));
|
||||
|
||||
interval->data[0] = pq_getmsgint(buf, sizeof(interval->data[0]));
|
||||
interval->data[1] = pq_getmsgint(buf, sizeof(interval->data[1]));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* PostgreSQL type definitions for the INET and CIDR types.
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.46 2003/09/25 06:58:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.47 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
* Jon Postel RIP 16 Oct 1998
|
||||
*/
|
||||
@@ -191,23 +191,23 @@ inet_recv(PG_FUNCTION_ARGS)
|
||||
ip_family(addr) != PGSQL_AF_INET6)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid family in external inet")));
|
||||
errmsg("invalid address family in external \"inet\" value")));
|
||||
bits = pq_getmsgbyte(buf);
|
||||
if (bits < 0 || bits > ip_maxbits(addr))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid bits in external inet")));
|
||||
errmsg("invalid bits in external \"inet\" value")));
|
||||
ip_bits(addr) = bits;
|
||||
ip_type(addr) = pq_getmsgbyte(buf);
|
||||
if (ip_type(addr) != 0 && ip_type(addr) != 1)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid type in external inet")));
|
||||
errmsg("invalid type in external \"inet\" value")));
|
||||
nb = pq_getmsgbyte(buf);
|
||||
if (nb != ip_addrsize(addr))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid length in external inet")));
|
||||
errmsg("invalid length in external \"inet\" value")));
|
||||
VARATT_SIZEP(addr) = VARHDRSZ
|
||||
+ ((char *) ip_addr(addr) - (char *) VARDATA(addr))
|
||||
+ ip_addrsize(addr);
|
||||
@@ -225,7 +225,7 @@ inet_recv(PG_FUNCTION_ARGS)
|
||||
if (!addressOK(ip_addr(addr), bits, ip_family(addr)))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid external cidr value"),
|
||||
errmsg("invalid external \"cidr\" value"),
|
||||
errdetail("Value has bits set to right of mask.")));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* Copyright (c) 1998-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.66 2003/09/25 06:58:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.67 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -400,7 +400,7 @@ numeric_recv(PG_FUNCTION_ARGS)
|
||||
if (len < 0 || len > NUMERIC_MAX_PRECISION + NUMERIC_MAX_RESULT_SCALE)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid length in external numeric")));
|
||||
errmsg("invalid length in external \"numeric\" value")));
|
||||
|
||||
alloc_var(&value, len);
|
||||
|
||||
@@ -411,7 +411,7 @@ numeric_recv(PG_FUNCTION_ARGS)
|
||||
value.sign == NUMERIC_NAN))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid sign in external numeric")));
|
||||
errmsg("invalid sign in external \"numeric\" value")));
|
||||
|
||||
value.dscale = (uint16) pq_getmsgint(buf, sizeof(uint16));
|
||||
for (i = 0; i < len; i++)
|
||||
@@ -421,7 +421,7 @@ numeric_recv(PG_FUNCTION_ARGS)
|
||||
if (d < 0 || d >= NBASE)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
|
||||
errmsg("invalid digit in external numeric")));
|
||||
errmsg("invalid digit in external \"numeric\" value")));
|
||||
value.digits[i] = d;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.59 2003/09/28 02:11:23 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.60 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
* ----------
|
||||
*/
|
||||
@@ -2731,7 +2731,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind)
|
||||
errmsg("no target table given for trigger \"%s\" on table \"%s\"",
|
||||
trigdata->tg_trigger->tgname,
|
||||
RelationGetRelationName(trigdata->tg_relation)),
|
||||
errhint("Remove this RI trigger and its mates, then do ALTER TABLE ADD CONSTRAINT.")));
|
||||
errhint("Remove this referential integrity trigger and its mates, then do ALTER TABLE ADD CONSTRAINT.")));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.95 2003/09/25 06:58:04 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.96 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2853,7 +2853,7 @@ isoweek2date(int woy, int *year, int *mon, int *mday)
|
||||
if (!*year)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("cannot convert week number without year information")));
|
||||
errmsg("cannot calculate week number without year information")));
|
||||
|
||||
/* fourth day of current year */
|
||||
day4 = date2j(*year, 1, 4);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.160 2003/09/26 15:27:37 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.161 2003/09/29 00:05:25 petere Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@@ -423,7 +423,7 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
{
|
||||
/* Not for general use --- used by SET SESSION AUTHORIZATION */
|
||||
{"is_superuser", PGC_INTERNAL, UNGROUPED,
|
||||
gettext_noop("set to indicate current user's privilege status"),
|
||||
gettext_noop("shows whether the current user is a superuser"),
|
||||
NULL,
|
||||
GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
@@ -473,7 +473,7 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
{
|
||||
{"silent_mode", PGC_POSTMASTER, LOGGING_WHEN,
|
||||
gettext_noop("run the server silently"),
|
||||
gettext_noop("If this option is set, the server will automatically run in the "
|
||||
gettext_noop("If this parameter is set, the server will automatically run in the "
|
||||
"background and any controlling terminals are dissociated.")
|
||||
},
|
||||
&SilentMode,
|
||||
@@ -560,7 +560,7 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
},
|
||||
{
|
||||
{"debug_print_plan", PGC_USERSET, LOGGING_WHAT,
|
||||
gettext_noop("print execution plan to the server log"),
|
||||
gettext_noop("print execution plan to server log"),
|
||||
NULL
|
||||
},
|
||||
&Debug_print_plan,
|
||||
@@ -760,7 +760,7 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
gettext_noop("encrypt passwords"),
|
||||
gettext_noop("When a password is specified in CREATE USER or "
|
||||
"ALTER USER without writing either ENCRYPTED or UNENCRYPTED, "
|
||||
"this option determines whether the password is to be encrypted.")
|
||||
"this parameter determines whether the password is to be encrypted.")
|
||||
},
|
||||
&Password_encryption,
|
||||
true, NULL, NULL
|
||||
@@ -890,7 +890,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
{"geqo_generations", PGC_USERSET, QUERY_TUNING_GEQO,
|
||||
gettext_noop("GEQO: number of iterations in the algorithm"),
|
||||
gettext_noop("The number must be a positive integer. If 0 is "
|
||||
"specified then effort * log2(poolsize) is used")
|
||||
"specified then effort * log2(poolsize) is used.")
|
||||
},
|
||||
&Geqo_generations,
|
||||
0, 0, INT_MAX, NULL, NULL
|
||||
@@ -909,7 +909,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
{
|
||||
{"syslog", PGC_SIGHUP, LOGGING_SYSLOG,
|
||||
gettext_noop("use syslog for logging"),
|
||||
gettext_noop("If this option is 1, messages go both to syslog "
|
||||
gettext_noop("If this parameter is 1, messages go both to syslog "
|
||||
"and the standard output. A value of 2 sends output only to syslog. "
|
||||
"(Some messages will still go to the standard output/error.) The "
|
||||
"default is 0, which means syslog is off.")
|
||||
@@ -966,7 +966,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
{"unix_socket_permissions", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
|
||||
gettext_noop("access permissions of the Unix-domain socket"),
|
||||
gettext_noop("Unix-domain sockets use the usual Unix file system "
|
||||
"permission set. The option value is expected to be an numeric mode "
|
||||
"permission set. The parameter value is expected to be an numeric mode "
|
||||
"specification in the form accepted by the chmod and umask system "
|
||||
"calls. (To use the customary octal format the number must start with "
|
||||
"a 0 (zero).)")
|
||||
@@ -1094,7 +1094,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
|
||||
{
|
||||
{"checkpoint_segments", PGC_SIGHUP, WAL_CHECKPOINTS,
|
||||
gettext_noop("maximum distance between automatic WAL checkpoints"),
|
||||
gettext_noop("maximum distance in log segments between automatic WAL checkpoints"),
|
||||
NULL
|
||||
},
|
||||
&CheckPointSegments,
|
||||
@@ -1114,7 +1114,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
{"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS,
|
||||
gettext_noop("log if filling of checkpoint segments happens more "
|
||||
"frequently than this (in seconds)"),
|
||||
gettext_noop("Send a message to the server logs if checkpoints "
|
||||
gettext_noop("Write a message to the server log if checkpoints "
|
||||
"caused by the filling of checkpoint segment files happens more "
|
||||
"frequently than this number of seconds. Zero turns off the warning.")
|
||||
},
|
||||
@@ -1348,7 +1348,7 @@ static struct config_string ConfigureNamesString[] =
|
||||
{"dynamic_library_path", PGC_SUSET, CLIENT_CONN_OTHER,
|
||||
gettext_noop("path for dynamically loadable modules"),
|
||||
gettext_noop("If a dynamically loadable module needs to be opened and "
|
||||
"the specified name does not have a directory component (i.e. the "
|
||||
"the specified name does not have a directory component (i.e., the "
|
||||
"name does not contain a slash), the system will search this path for "
|
||||
"the specified file.")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user