mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
Change elog(WARN) to elog(ERROR) and elog(ABORT).
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.19 1997/09/20 16:17:45 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.20 1998/01/05 03:33:59 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This code is actually (almost) unused.
|
||||
@@ -129,14 +129,14 @@ reltimein(char *str)
|
||||
char lowstr[MAXDATELEN + 1];
|
||||
|
||||
if (!PointerIsValid(str))
|
||||
elog(WARN, "Bad (null) date external representation", NULL);
|
||||
elog(ABORT, "Bad (null) date external representation", NULL);
|
||||
|
||||
if (strlen(str) > MAXDATELEN)
|
||||
elog(WARN, "Bad (length) reltime external representation '%s'", str);
|
||||
elog(ABORT, "Bad (length) reltime external representation '%s'", str);
|
||||
|
||||
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
|
||||
|| (DecodeDateDelta(field, ftype, nf, &dtype, tm, &fsec) != 0))
|
||||
elog(WARN, "Bad reltime external representation '%s'", str);
|
||||
elog(ABORT, "Bad reltime external representation '%s'", str);
|
||||
|
||||
#ifdef DATEDEBUG
|
||||
printf("reltimein- %d fields are type %d (DTK_DATE=%d)\n", nf, dtype, DTK_DATE);
|
||||
@@ -153,7 +153,7 @@ reltimein(char *str)
|
||||
return (INVALID_RELTIME);
|
||||
}
|
||||
|
||||
elog(WARN, "Bad reltime (internal coding error) '%s'", str);
|
||||
elog(ABORT, "Bad reltime (internal coding error) '%s'", str);
|
||||
return (INVALID_RELTIME);
|
||||
} /* reltimein() */
|
||||
|
||||
@@ -361,7 +361,7 @@ reltime_timespan(RelativeTime reltime)
|
||||
month;
|
||||
|
||||
if (!PointerIsValid(result = PALLOCTYPE(TimeSpan)))
|
||||
elog(WARN, "Memory allocation failed, can't convert reltime to timespan", NULL);
|
||||
elog(ABORT, "Memory allocation failed, can't convert reltime to timespan", NULL);
|
||||
|
||||
switch (reltime)
|
||||
{
|
||||
|
Reference in New Issue
Block a user