aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r--src/backend/utils/adt/acl.c34
-rw-r--r--src/backend/utils/adt/arrayfuncs.c52
-rw-r--r--src/backend/utils/adt/bool.c4
-rw-r--r--src/backend/utils/adt/cash.c42
-rw-r--r--src/backend/utils/adt/chunk.c12
-rw-r--r--src/backend/utils/adt/date.c12
-rw-r--r--src/backend/utils/adt/datetime.c42
-rw-r--r--src/backend/utils/adt/datum.c8
-rw-r--r--src/backend/utils/adt/dt.c70
-rw-r--r--src/backend/utils/adt/filename.c10
-rw-r--r--src/backend/utils/adt/float.c46
-rw-r--r--src/backend/utils/adt/geo_ops.c66
-rw-r--r--src/backend/utils/adt/int.c6
-rw-r--r--src/backend/utils/adt/nabstime.c12
-rw-r--r--src/backend/utils/adt/numutils.c20
-rw-r--r--src/backend/utils/adt/oidname.c4
-rw-r--r--src/backend/utils/adt/regexp.c4
-rw-r--r--src/backend/utils/adt/regproc.c14
-rw-r--r--src/backend/utils/adt/selfuncs.c22
-rw-r--r--src/backend/utils/adt/sets.c6
-rw-r--r--src/backend/utils/adt/varchar.c10
-rw-r--r--src/backend/utils/adt/varlena.c18
22 files changed, 257 insertions, 257 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 55be65d2892..0e4c8eea157 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.22 1998/01/05 03:33:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.23 1998/01/05 16:39:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,7 +54,7 @@ getid(char *s, char *n)
for (id = s, len = 0; isalnum(*s) || *s == '_'; ++len, ++s)
;
if (len > sizeof(NameData))
- elog(ABORT, "getid: identifier cannot be >%d characters",
+ elog(ERROR, "getid: identifier cannot be >%d characters",
sizeof(NameData));
if (len > 0)
memmove(n, id, len);
@@ -102,11 +102,11 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
}
else if (strcmp(name, ACL_IDTYPE_UID_KEYWORD))
{
- elog(ABORT, "aclparse: bad keyword, must be [group|user]");
+ elog(ERROR, "aclparse: bad keyword, must be [group|user]");
}
s = getid(s, name); /* move s to the name beyond the keyword */
if (name[0] == '\0')
- elog(ABORT, "aclparse: a name must follow the [group|user] keyword");
+ elog(ERROR, "aclparse: a name must follow the [group|user] keyword");
}
if (name[0] == '\0')
aip->ai_idtype = ACL_IDTYPE_WORLD;
@@ -123,7 +123,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
*modechg = ACL_MODECHG_EQL;
break;
default:
- elog(ABORT, "aclparse: mode change flag must use \"%s\"",
+ elog(ERROR, "aclparse: mode change flag must use \"%s\"",
ACL_MODECHG_STR);
}
@@ -145,7 +145,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
aip->ai_mode |= ACL_RU;
break;
default:
- elog(ABORT, "aclparse: mode flags must use \"%s\"",
+ elog(ERROR, "aclparse: mode flags must use \"%s\"",
ACL_MODE_STR);
}
}
@@ -156,7 +156,7 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
htp = SearchSysCacheTuple(USENAME, PointerGetDatum(name),
0, 0, 0);
if (!HeapTupleIsValid(htp))
- elog(ABORT, "aclparse: non-existent user \"%s\"", name);
+ elog(ERROR, "aclparse: non-existent user \"%s\"", name);
aip->ai_id = ((Form_pg_user) GETSTRUCT(htp))->usesysid;
break;
case ACL_IDTYPE_GID:
@@ -188,10 +188,10 @@ makeacl(int n)
Size size;
if (n < 0)
- elog(ABORT, "makeacl: invalid size: %d\n", n);
+ elog(ERROR, "makeacl: invalid size: %d\n", n);
size = ACL_N_SIZE(n);
if (!(new_acl = (Acl *) palloc(size)))
- elog(ABORT, "makeacl: palloc failed on %d\n", size);
+ elog(ERROR, "makeacl: palloc failed on %d\n", size);
MemSet((char *) new_acl, 0, size);
new_acl->size = size;
new_acl->ndim = 1;
@@ -216,18 +216,18 @@ aclitemin(char *s)
AclItem *aip;
if (!s)
- elog(ABORT, "aclitemin: null string");
+ elog(ERROR, "aclitemin: null string");
aip = (AclItem *) palloc(sizeof(AclItem));
if (!aip)
- elog(ABORT, "aclitemin: palloc failed");
+ elog(ERROR, "aclitemin: palloc failed");
s = aclparse(s, aip, &modechg);
if (modechg != ACL_MODECHG_EQL)
- elog(ABORT, "aclitemin: cannot accept anything but = ACLs");
+ elog(ERROR, "aclitemin: cannot accept anything but = ACLs");
while (isspace(*s))
++s;
if (*s)
- elog(ABORT, "aclitemin: extra garbage at end of specification");
+ elog(ERROR, "aclitemin: extra garbage at end of specification");
return (aip);
}
@@ -257,7 +257,7 @@ aclitemout(AclItem *aip)
p = out = palloc(strlen("group =arwR ") + 1 + NAMEDATALEN);
if (!out)
- elog(ABORT, "aclitemout: palloc failed");
+ elog(ERROR, "aclitemout: palloc failed");
*p = '\0';
switch (aip->ai_idtype)
@@ -296,7 +296,7 @@ aclitemout(AclItem *aip)
case ACL_IDTYPE_WORLD:
break;
default:
- elog(ABORT, "aclitemout: bad ai_idtype: %d", aip->ai_idtype);
+ elog(ERROR, "aclitemout: bad ai_idtype: %d", aip->ai_idtype);
break;
}
while (*p)
@@ -420,7 +420,7 @@ aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg)
new_aip = ACL_DAT(new_acl);
if (dst == 0)
{ /* start */
- elog(ABORT, "aclinsert3: insertion before world ACL??");
+ elog(ERROR, "aclinsert3: insertion before world ACL??");
}
else if (dst >= num)
{ /* end */
@@ -534,7 +534,7 @@ aclremove(Acl *old_acl, AclItem *mod_aip)
new_aip = ACL_DAT(new_acl);
if (dst == 0)
{ /* start */
- elog(ABORT, "aclremove: removal of the world ACL??");
+ elog(ERROR, "aclremove: removal of the world ACL??");
}
else if (dst == old_num - 1)
{ /* end */
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 9ce02de5409..529cddb99e2 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.22 1998/01/05 03:33:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.23 1998/01/05 16:39:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -145,14 +145,14 @@ array_in(char *string, /* input array in external form */
}
for (q = p; isdigit(*q); q++);
if (*q != ']')
- elog(ABORT, "array_in: missing ']' in array declaration");
+ elog(ERROR, "array_in: missing ']' in array declaration");
*q = '\0';
dim[ndim] = atoi(p);
if ((dim[ndim] < 0) || (lBound[ndim] < 0))
- elog(ABORT, "array_in: array dimensions need to be positive");
+ elog(ERROR, "array_in: array dimensions need to be positive");
dim[ndim] = dim[ndim] - lBound[ndim] + 1;
if (dim[ndim] < 0)
- elog(ABORT, "array_in: upper_bound cannot be < lower_bound");
+ elog(ERROR, "array_in: upper_bound cannot be < lower_bound");
p = q + 1;
ndim++;
}
@@ -171,7 +171,7 @@ array_in(char *string, /* input array in external form */
}
else
{
- elog(ABORT, "array_in: Need to specify dimension");
+ elog(ERROR, "array_in: Need to specify dimension");
}
}
else
@@ -179,7 +179,7 @@ array_in(char *string, /* input array in external form */
while (isspace(*p))
p++;
if (strncmp(p, ASSGN, strlen(ASSGN)))
- elog(ABORT, "array_in: missing assignment operator");
+ elog(ERROR, "array_in: missing assignment operator");
p += strlen(ASSGN);
while (isspace(*p))
p++;
@@ -249,7 +249,7 @@ array_in(char *string, /* input array in external form */
memmove((char *) ARR_LBOUND(retval), (char *) lBound, ndim * sizeof(int));
memmove(ARR_DATA_PTR(retval), dataPtr, bytes);
#endif
- elog(ABORT, "large object arrays not supported");
+ elog(ERROR, "large object arrays not supported");
}
pfree(string_save);
return ((char *) retval);
@@ -302,7 +302,7 @@ _ArrayCount(char *str, int dim[], int typdelim)
* Signal a premature end of the string. DZ -
* 2-9-1996
*/
- elog(ABORT, "malformed array constant: %s", str);
+ elog(ERROR, "malformed array constant: %s", str);
break;
case '\"':
scanning_string = !scanning_string;
@@ -425,7 +425,7 @@ _ReadArrayStr(char *arrayStr,
p++;
nest_level++;
if (nest_level > ndim)
- elog(ABORT, "array_in: illformed array constant");
+ elog(ERROR, "array_in: illformed array constant");
indx[nest_level - 1] = 0;
indx[ndim - 1] = 0;
}
@@ -460,7 +460,7 @@ _ReadArrayStr(char *arrayStr,
}
*q = '\0';
if (i >= nitems)
- elog(ABORT, "array_in: illformed array constant");
+ elog(ERROR, "array_in: illformed array constant");
values[i] = (*inputproc) (p, typelem);
p = ++q;
if (!eoArray)
@@ -544,27 +544,27 @@ _ReadLOArray(char *str,
if (!strcmp(word, "-chunk"))
{
if (str == NULL)
- elog(ABORT, "array_in: access pattern file required");
+ elog(ERROR, "array_in: access pattern file required");
str = _AdvanceBy1word(str, &accessfile);
}
else if (!strcmp(word, "-noreorg"))
{
if (str == NULL)
- elog(ABORT, "array_in: chunk file required");
+ elog(ERROR, "array_in: chunk file required");
str = _AdvanceBy1word(str, &chunkfile);
}
else
{
- elog(ABORT, "usage: <input file> -chunk DEFAULT/<access pattern file> -invert/-native [-noreorg <chunk file>]");
+ elog(ERROR, "usage: <input file> -chunk DEFAULT/<access pattern file> -invert/-native [-noreorg <chunk file>]");
}
}
if (inputfile == NULL)
- elog(ABORT, "array_in: missing file name");
+ elog(ERROR, "array_in: missing file name");
lobjId = lo_creat(0);
*fd = lo_open(lobjId, INV_READ);
if (*fd < 0)
- elog(ABORT, "Large object create failed");
+ elog(ERROR, "Large object create failed");
retStr = inputfile;
*nbytes = strlen(retStr) + 2;
@@ -573,7 +573,7 @@ _ReadLOArray(char *str,
FILE *afd;
if ((afd = AllocateFile(accessfile, "r")) == NULL)
- elog(ABORT, "unable to open access pattern file");
+ elog(ERROR, "unable to open access pattern file");
*chunkFlag = true;
retStr = _ChunkArray(*fd, afd, ndim, dim, baseSize, nbytes,
chunkfile);
@@ -836,7 +836,7 @@ array_ref(ArrayType *array,
* fixed length arrays -- these are assumed to be 1-d
*/
if (indx[0] * elmlen > arraylen)
- elog(ABORT, "array_ref: array bound exceeded");
+ elog(ERROR, "array_ref: array bound exceeded");
retval = (char *) array + indx[0] * elmlen;
return _ArrayCast(retval, reftype, elmlen);
}
@@ -964,7 +964,7 @@ array_clip(ArrayType *array,
for (i = 0; i < n; i++)
if (lowerIndx[i] > upperIndx[i])
- elog(ABORT, "lowerIndex cannot be larger than upperIndx");
+ elog(ERROR, "lowerIndex cannot be larger than upperIndx");
mda_get_range(n, span, lowerIndx, upperIndx);
if (ARR_IS_LO(array))
@@ -980,7 +980,7 @@ array_clip(ArrayType *array,
rsize;
if (len < 0)
- elog(ABORT, "array_clip: array of variable length objects not supported");
+ elog(ERROR, "array_clip: array of variable length objects not supported");
#ifdef LOARRAY
lo_name = (char *) ARR_DATA_PTR(array);
if ((fd = LOopen(lo_name, ARR_IS_INV(array) ? INV_READ : O_RDONLY)) < 0)
@@ -1098,7 +1098,7 @@ array_set(ArrayType *array,
* fixed length arrays -- these are assumed to be 1-d
*/
if (indx[0] * elmlen > arraylen)
- elog(ABORT, "array_ref: array bound exceeded");
+ elog(ERROR, "array_ref: array bound exceeded");
pos = (char *) array + indx[0] * elmlen;
ArrayCastAndSet(dataPtr, (bool) reftype, elmlen, pos);
return ((char *) array);
@@ -1110,7 +1110,7 @@ array_set(ArrayType *array,
if (!SanityCheckInput(ndim, n, dim, lb, indx))
{
- elog(ABORT, "array_set: array bound exceeded");
+ elog(ERROR, "array_set: array bound exceeded");
return ((char *) array);
}
offset = GetOffset(n, dim, lb, indx);
@@ -1225,7 +1225,7 @@ array_assgn(ArrayType *array,
if (array == (ArrayType *) NULL)
RETURN_NULL;
if (len < 0)
- elog(ABORT, "array_assgn:updates on arrays of variable length elements not allowed");
+ elog(ERROR, "array_assgn:updates on arrays of variable length elements not allowed");
dim = ARR_DIMS(array);
lb = ARR_LBOUND(array);
@@ -1239,7 +1239,7 @@ array_assgn(ArrayType *array,
for (i = 0; i < n; i++)
if (lowerIndx[i] > upperIndx[i])
- elog(ABORT, "lowerIndex larger than upperIndx");
+ elog(ERROR, "lowerIndex larger than upperIndx");
if (ARR_IS_LO(array))
{
@@ -1315,7 +1315,7 @@ system_cache_lookup(Oid element_type,
if (!HeapTupleIsValid(typeTuple))
{
- elog(ABORT, "array_out: Cache lookup failed for type %d\n",
+ elog(ERROR, "array_out: Cache lookup failed for type %d\n",
element_type);
return;
}
@@ -1350,7 +1350,7 @@ _ArrayCast(char *value, bool byval, int len)
case 4:
return ((Datum) *(int32 *) value);
default:
- elog(ABORT, "array_ref: byval and elt len > 4!");
+ elog(ERROR, "array_ref: byval and elt len > 4!");
break;
}
}
@@ -1734,7 +1734,7 @@ _array_newLO(int *fd, int flag)
strcpy(saveName, p);
#ifdef LOARRAY
if ((*fd = LOcreat(saveName, 0600, flag)) < 0)
- elog(ABORT, "Large object create failed");
+ elog(ERROR, "Large object create failed");
#endif
return (p);
}
diff --git a/src/backend/utils/adt/bool.c b/src/backend/utils/adt/bool.c
index dafb46cd3e0..fbfaa6973d4 100644
--- a/src/backend/utils/adt/bool.c
+++ b/src/backend/utils/adt/bool.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.12 1998/01/05 03:33:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.13 1998/01/05 16:39:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -72,7 +72,7 @@ boolin(char *b)
break;
}
- elog(ABORT,"Bad boolean external representation '%s'", b);
+ elog(ERROR,"Bad boolean external representation '%s'", b);
/* not reached */
return (FALSE);
} /* boolin() */
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index e70cb036455..dbe34a30a80 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.19 1998/01/05 03:33:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.20 1998/01/05 16:39:45 momjian Exp $
*/
#include <stdio.h>
@@ -156,10 +156,10 @@ printf( "cashin- precision %d; decimal %c; thousands %c; currency %c; positive %
s++;
if (*s != '\0')
- elog(ABORT, "Bad money external representation %s", str);
+ elog(ERROR, "Bad money external representation %s", str);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't input cash '%s'", str);
+ elog(ERROR, "Memory allocation failed, can't input cash '%s'", str);
*result = (value * sgn);
@@ -257,7 +257,7 @@ cash_out(Cash *in_value)
if (minus)
{
if (!PointerIsValid(result = PALLOC(CASH_BUFSZ + 2 - count + strlen(nsymbol))))
- elog(ABORT, "Memory allocation failed, can't output cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't output cash", NULL);
/* Position code of 0 means use parens */
if (convention == 0)
@@ -270,7 +270,7 @@ cash_out(Cash *in_value)
else
{
if (!PointerIsValid(result = PALLOC(CASH_BUFSZ + 2 - count)))
- elog(ABORT, "Memory allocation failed, can't output cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't output cash", NULL);
strcpy(result, buf + count);
}
@@ -346,7 +346,7 @@ cash_pl(Cash *c1, Cash *c2)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't add cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't add cash", NULL);
*result = (*c1 + *c2);
@@ -366,7 +366,7 @@ cash_mi(Cash *c1, Cash *c2)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't subtract cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't subtract cash", NULL);
*result = (*c1 - *c2);
@@ -386,7 +386,7 @@ cash_mul_flt8(Cash *c, float8 *f)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't multiply cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
*result = ((*f) * (*c));
@@ -419,10 +419,10 @@ cash_div_flt8(Cash *c, float8 *f)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't divide cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
if (*f == 0.0)
- elog(ABORT, "cash_div: divide by 0.0 error");
+ elog(ERROR, "cash_div: divide by 0.0 error");
*result = rint(*c / *f);
@@ -441,7 +441,7 @@ cash_mul_flt4(Cash *c, float4 *f)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't multiply cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
*result = ((*f) * (*c));
@@ -474,10 +474,10 @@ cash_div_flt4(Cash *c, float4 *f)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't divide cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
if (*f == 0.0)
- elog(ABORT, "cash_div: divide by 0.0 error");
+ elog(ERROR, "cash_div: divide by 0.0 error");
*result = rint(*c / *f);
@@ -497,7 +497,7 @@ cash_mul_int4(Cash *c, int4 i)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't multiply cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
*result = ((i) * (*c));
@@ -530,10 +530,10 @@ cash_div_int4(Cash *c, int4 i)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't divide cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
if (i == 0)
- elog(ABORT, "cash_idiv: divide by 0 error");
+ elog(ERROR, "cash_idiv: divide by 0 error");
*result = rint(*c / i);
@@ -553,7 +553,7 @@ cash_mul_int2(Cash *c, int2 s)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't multiply cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't multiply cash", NULL);
*result = ((s) * (*c));
@@ -586,10 +586,10 @@ cash_div_int2(Cash *c, int2 s)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't divide cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't divide cash", NULL);
if (s == 0)
- elog(ABORT, "cash_div: divide by 0 error");
+ elog(ERROR, "cash_div: divide by 0 error");
*result = rint(*c / s);
@@ -609,7 +609,7 @@ cashlarger(Cash *c1, Cash *c2)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't return larger cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't return larger cash", NULL);
*result = ((*c1 > *c2) ? *c1 : *c2);
@@ -629,7 +629,7 @@ cashsmaller(Cash *c1, Cash *c2)
return (NULL);
if (!PointerIsValid(result = PALLOCTYPE(Cash)))
- elog(ABORT, "Memory allocation failed, can't return smaller cash", NULL);
+ elog(ERROR, "Memory allocation failed, can't return smaller cash", NULL);
*result = ((*c1 < *c2) ? *c1 : *c2);
diff --git a/src/backend/utils/adt/chunk.c b/src/backend/utils/adt/chunk.c
index 9ae09c8d4ec..24c70117791 100644
--- a/src/backend/utils/adt/chunk.c
+++ b/src/backend/utils/adt/chunk.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.12 1998/01/05 03:33:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.13 1998/01/05 16:39:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -104,7 +104,7 @@ _ChunkArray(int fd,
else
cfd = LOopen(chunkfile, O_RDONLY);
if (cfd < 0)
- elog(ABORT, "Unable to open chunk file");
+ elog(ERROR, "Unable to open chunk file");
#endif
strcpy(cInfo.lo_name, chunkfile);
@@ -148,11 +148,11 @@ GetChunkSize(FILE *fd,
*/
fscanf(fd, "%d", &N);
if (N > MAXPAT)
- elog(ABORT, "array_in: too many access pattern elements");
+ elog(ERROR, "array_in: too many access pattern elements");
for (i = 0; i < N; i++)
for (j = 0; j < ndim + 1; j++)
if (fscanf(fd, "%d ", &(A[i][j])) == EOF)
- elog(ABORT, "array_in: bad access pattern input");
+ elog(ERROR, "array_in: bad access pattern input");
/*
* estimate chunk size
@@ -413,12 +413,12 @@ seek_and_read(int pos, int size, char buff[], int fp, int from)
/* Assuming only one file */
if (lo_lseek(fp, pos, from) < 0)
- elog(ABORT, "File seek error");
+ elog(ERROR, "File seek error");
#ifdef LOARRAY
v = (struct varlena *) LOread(fp, size);
#endif
if (VARSIZE(v) - VARHDRSZ < size)
- elog(ABORT, "File read error");
+ elog(ERROR, "File read error");
memmove(buff, VARDATA(v), size);
pfree(v);
return (1);
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 92903f6e8b9..c42b9d09636 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.20 1998/01/05 03:33:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.21 1998/01/05 16:39:48 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
@@ -129,14 +129,14 @@ reltimein(char *str)
char lowstr[MAXDATELEN + 1];
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) date external representation", NULL);
+ elog(ERROR, "Bad (null) date external representation", NULL);
if (strlen(str) > MAXDATELEN)
- elog(ABORT, "Bad (length) reltime external representation '%s'", str);
+ elog(ERROR, "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(ABORT, "Bad reltime external representation '%s'", str);
+ elog(ERROR, "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(ABORT, "Bad reltime (internal coding error) '%s'", str);
+ elog(ERROR, "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(ABORT, "Memory allocation failed, can't convert reltime to timespan", NULL);
+ elog(ERROR, "Memory allocation failed, can't convert reltime to timespan", NULL);
switch (reltime)
{
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index ecaa04044c1..50c72c179fd 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.19 1998/01/05 03:34:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.20 1998/01/05 16:39:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,14 +71,14 @@ date_in(char *str)
char lowstr[MAXDATELEN + 1];
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) date external representation", NULL);
+ elog(ERROR, "Bad (null) date external representation", NULL);
#ifdef DATEDEBUG
printf("date_in- input string is %s\n", str);
#endif
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
|| (DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tzp) != 0))
- elog(ABORT, "Bad date external representation %s", str);
+ elog(ERROR, "Bad date external representation %s", str);
switch (dtype)
{
@@ -96,15 +96,15 @@ date_in(char *str)
break;
default:
- elog(ABORT, "Unrecognized date external representation %s", str);
+ elog(ERROR, "Unrecognized date external representation %s", str);
}
if (tm->tm_year < 0 || tm->tm_year > 32767)
- elog(ABORT, "date_in: year must be limited to values 0 through 32767 in '%s'", str);
+ elog(ERROR, "date_in: year must be limited to values 0 through 32767 in '%s'", str);
if (tm->tm_mon < 1 || tm->tm_mon > 12)
- elog(ABORT, "date_in: month must be limited to values 1 through 12 in '%s'", str);
+ elog(ERROR, "date_in: month must be limited to values 1 through 12 in '%s'", str);
if (tm->tm_mday < 1 || tm->tm_mday > day_tab[isleap(tm->tm_year)][tm->tm_mon - 1])
- elog(ABORT, "date_in: day must be limited to values 1 through %d in '%s'",
+ elog(ERROR, "date_in: day must be limited to values 1 through %d in '%s'",
day_tab[isleap(tm->tm_year)][tm->tm_mon - 1], str);
date = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1));
@@ -239,7 +239,7 @@ date_datetime(DateADT dateVal)
result = PALLOCTYPE(DateTime);
if (date2tm(dateVal, &tz, tm, &fsec, &tzn) != 0)
- elog(ABORT, "Unable to convert date to datetime", NULL);
+ elog(ERROR, "Unable to convert date to datetime", NULL);
#ifdef DATEDEBUG
printf("date_datetime- date is %d.%02d.%02d\n", tm->tm_year, tm->tm_mon, tm->tm_mday);
@@ -247,7 +247,7 @@ date_datetime(DateADT dateVal)
#endif
if (tm2datetime(tm, fsec, &tz, result) != 0)
- elog(ABORT, "Datetime out of range", NULL);
+ elog(ERROR, "Datetime out of range", NULL);
return (result);
} /* date_datetime() */
@@ -267,10 +267,10 @@ datetime_date(DateTime *datetime)
char *tzn;
if (!PointerIsValid(datetime))
- elog(ABORT, "Unable to convert null datetime to date", NULL);
+ elog(ERROR, "Unable to convert null datetime to date", NULL);
if (DATETIME_NOT_FINITE(*datetime))
- elog(ABORT, "Unable to convert datetime to date", NULL);
+ elog(ERROR, "Unable to convert datetime to date", NULL);
if (DATETIME_IS_EPOCH(*datetime))
{
@@ -285,7 +285,7 @@ datetime_date(DateTime *datetime)
else
{
if (datetime2tm(*datetime, &tz, tm, &fsec, &tzn) != 0)
- elog(ABORT, "Unable to convert datetime to date", NULL);
+ elog(ERROR, "Unable to convert datetime to date", NULL);
}
result = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday) - date2j(2000, 1, 1));
@@ -310,7 +310,7 @@ abstime_date(AbsoluteTime abstime)
case INVALID_ABSTIME:
case NOSTART_ABSTIME:
case NOEND_ABSTIME:
- elog(ABORT, "Unable to convert reserved abstime value to date", NULL);
+ elog(ERROR, "Unable to convert reserved abstime value to date", NULL);
/*
* pretend to drop through to make compiler think that result
@@ -440,18 +440,18 @@ time_in(char *str)
int ftype[MAXDATEFIELDS];
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) time external representation", NULL);
+ elog(ERROR, "Bad (null) time external representation", NULL);
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
|| (DecodeTimeOnly(field, ftype, nf, &dtype, tm, &fsec) != 0))
- elog(ABORT, "Bad time external representation '%s'", str);
+ elog(ERROR, "Bad time external representation '%s'", str);
if ((tm->tm_hour < 0) || (tm->tm_hour > 23))
- elog(ABORT, "Hour must be limited to values 0 through 23 in '%s'", str);
+ elog(ERROR, "Hour must be limited to values 0 through 23 in '%s'", str);
if ((tm->tm_min < 0) || (tm->tm_min > 59))
- elog(ABORT, "Minute must be limited to values 0 through 59 in '%s'", str);
+ elog(ERROR, "Minute must be limited to values 0 through 59 in '%s'", str);
if ((tm->tm_sec < 0) || ((tm->tm_sec + fsec) >= 60))
- elog(ABORT, "Second must be limited to values 0 through < 60 in '%s'", str);
+ elog(ERROR, "Second must be limited to values 0 through < 60 in '%s'", str);
time = PALLOCTYPE(TimeADT);
@@ -565,10 +565,10 @@ datetime_time(DateTime *datetime)
char *tzn;
if (!PointerIsValid(datetime))
- elog(ABORT, "Unable to convert null datetime to date", NULL);
+ elog(ERROR, "Unable to convert null datetime to date", NULL);
if (DATETIME_NOT_FINITE(*datetime))
- elog(ABORT, "Unable to convert datetime to date", NULL);
+ elog(ERROR, "Unable to convert datetime to date", NULL);
if (DATETIME_IS_EPOCH(*datetime))
{
@@ -583,7 +583,7 @@ datetime_time(DateTime *datetime)
else
{
if (datetime2tm(*datetime, &tz, tm, &fsec, &tzn) != 0)
- elog(ABORT, "Unable to convert datetime to date", NULL);
+ elog(ERROR, "Unable to convert datetime to date", NULL);
}
result = PALLOCTYPE(TimeADT);
diff --git a/src/backend/utils/adt/datum.c b/src/backend/utils/adt/datum.c
index f7cee89aeb8..5fd7c1ed119 100644
--- a/src/backend/utils/adt/datum.c
+++ b/src/backend/utils/adt/datum.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.8 1998/01/05 03:34:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.9 1998/01/05 16:39:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,7 +61,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
}
else
{
- elog(ABORT,
+ elog(ERROR,
"datumGetSize: Error: type=%ld, byVaL with len=%d",
(long) type, len);
}
@@ -78,7 +78,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
s = (struct varlena *) DatumGetPointer(value);
if (!PointerIsValid(s))
{
- elog(ABORT,
+ elog(ERROR,
"datumGetSize: Invalid Datum Pointer");
}
size = (Size) VARSIZE(s);
@@ -132,7 +132,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len)
s = (char *) palloc(realSize);
if (s == NULL)
{
- elog(ABORT, "datumCopy: out of memory\n");
+ elog(ERROR, "datumCopy: out of memory\n");
}
memmove(s, DatumGetPointer(value), realSize);
res = (Datum) s;
diff --git a/src/backend/utils/adt/dt.c b/src/backend/utils/adt/dt.c
index ff3ac875a11..fec9b04b8fa 100644
--- a/src/backend/utils/adt/dt.c
+++ b/src/backend/utils/adt/dt.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.48 1998/01/05 03:34:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.49 1998/01/05 16:39:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -109,11 +109,11 @@ datetime_in(char *str)
char lowstr[MAXDATELEN + 1];
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) datetime external representation", NULL);
+ elog(ERROR, "Bad (null) datetime external representation", NULL);
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
|| (DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tz) != 0))
- elog(ABORT, "Bad datetime external representation '%s'", str);
+ elog(ERROR, "Bad datetime external representation '%s'", str);
result = PALLOCTYPE(DateTime);
@@ -121,7 +121,7 @@ datetime_in(char *str)
{
case DTK_DATE:
if (tm2datetime(tm, fsec, &tz, result) != 0)
- elog(ABORT, "Datetime out of range '%s'", str);
+ elog(ERROR, "Datetime out of range '%s'", str);
#ifdef DATEDEBUG
printf("datetime_in- date is %f\n", *result);
@@ -150,7 +150,7 @@ datetime_in(char *str)
break;
default:
- elog(ABORT, "Internal coding error, can't input datetime '%s'", str);
+ elog(ERROR, "Internal coding error, can't input datetime '%s'", str);
}
return (result);
@@ -225,11 +225,11 @@ timespan_in(char *str)
fsec = 0;
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) timespan external representation", NULL);
+ elog(ERROR, "Bad (null) timespan external representation", NULL);
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
|| (DecodeDateDelta(field, ftype, nf, &dtype, tm, &fsec) != 0))
- elog(ABORT, "Bad timespan external representation '%s'", str);
+ elog(ERROR, "Bad timespan external representation '%s'", str);
span = PALLOCTYPE(TimeSpan);
@@ -241,12 +241,12 @@ timespan_in(char *str)
#if FALSE
TIMESPAN_INVALID(span);
#endif
- elog(ABORT, "Bad timespan external representation '%s'", str);
+ elog(ERROR, "Bad timespan external representation '%s'", str);
}
break;
default:
- elog(ABORT, "Internal coding error, can't input timespan '%s'", str);
+ elog(ERROR, "Internal coding error, can't input timespan '%s'", str);
}
return (span);
@@ -272,7 +272,7 @@ timespan_out(TimeSpan *span)
return (NULL);
if (EncodeTimeSpan(tm, fsec, DateStyle, buf) != 0)
- elog(ABORT, "Unable to format timespan", NULL);
+ elog(ERROR, "Unable to format timespan", NULL);
result = PALLOC(strlen(buf) + 1);
@@ -904,7 +904,7 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
#endif
if (tm2datetime(tm, fsec, &tz, &dt) != 0)
- elog(ABORT, "Unable to add datetime and timespan", NULL);
+ elog(ERROR, "Unable to add datetime and timespan", NULL);
}
else
@@ -1106,10 +1106,10 @@ timespan_div(TimeSpan *span1, float8 *arg2)
return NULL;
if (!PointerIsValid(result = PALLOCTYPE(TimeSpan)))
- elog(ABORT, "Memory allocation failed, can't subtract timespans", NULL);
+ elog(ERROR, "Memory allocation failed, can't subtract timespans", NULL);
if (*arg2 == 0.0)
- elog(ABORT, "timespan_div: divide by 0.0 error");
+ elog(ERROR, "timespan_div: divide by 0.0 error");
result->month = rint(span1->month / *arg2);
result->time = JROUND(span1->time / *arg2);
@@ -1238,7 +1238,7 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
if (tm2timespan(tm, fsec, result) != 0)
{
- elog(ABORT, "Unable to decode datetime", NULL);
+ elog(ERROR, "Unable to decode datetime", NULL);
}
#if FALSE
@@ -1255,7 +1255,7 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
}
else
{
- elog(ABORT, "Unable to decode datetime", NULL);
+ elog(ERROR, "Unable to decode datetime", NULL);
}
return (result);
@@ -1436,7 +1436,7 @@ datetime_trunc(text *units, DateTime *datetime)
{
#if FALSE
/* should return null but Postgres doesn't like that currently. - tgl 97/06/12 */
- elog(ABORT, "Datetime is not finite", NULL);
+ elog(ERROR, "Datetime is not finite", NULL);
#endif
*result = 0;
@@ -1480,7 +1480,7 @@ datetime_trunc(text *units, DateTime *datetime)
break;
default:
- elog(ABORT, "Datetime units '%s' not supported", lowunits);
+ elog(ERROR, "Datetime units '%s' not supported", lowunits);
result = NULL;
}
@@ -1513,7 +1513,7 @@ datetime_trunc(text *units, DateTime *datetime)
}
if (tm2datetime(tm, fsec, &tz, result) != 0)
- elog(ABORT, "Unable to truncate datetime to '%s'", lowunits);
+ elog(ERROR, "Unable to truncate datetime to '%s'", lowunits);
#if FALSE
}
@@ -1526,7 +1526,7 @@ datetime_trunc(text *units, DateTime *datetime)
}
else
{
- elog(ABORT, "Datetime units '%s' not recognized", lowunits);
+ elog(ERROR, "Datetime units '%s' not recognized", lowunits);
result = NULL;
}
}
@@ -1580,7 +1580,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
if (TIMESPAN_IS_INVALID(*timespan))
{
#if FALSE
- elog(ABORT, "Timespan is not finite", NULL);
+ elog(ERROR, "Timespan is not finite", NULL);
#endif
result = NULL;
@@ -1623,12 +1623,12 @@ timespan_trunc(text *units, TimeSpan *timespan)
break;
default:
- elog(ABORT, "Timespan units '%s' not supported", lowunits);
+ elog(ERROR, "Timespan units '%s' not supported", lowunits);
result = NULL;
}
if (tm2timespan(tm, fsec, result) != 0)
- elog(ABORT, "Unable to truncate timespan to '%s'", lowunits);
+ elog(ERROR, "Unable to truncate timespan to '%s'", lowunits);
}
else
@@ -1652,7 +1652,7 @@ timespan_trunc(text *units, TimeSpan *timespan)
}
else
{
- elog(ABORT, "Timespan units '%s' not recognized", units);
+ elog(ERROR, "Timespan units '%s' not recognized", units);
result = NULL;
}
@@ -1708,7 +1708,7 @@ datetime_part(text *units, DateTime *datetime)
{
#if FALSE
/* should return null but Postgres doesn't like that currently. - tgl 97/06/12 */
- elog(ABORT, "Datetime is not finite", NULL);
+ elog(ERROR, "Datetime is not finite", NULL);
#endif
*result = 0;
@@ -1774,7 +1774,7 @@ datetime_part(text *units, DateTime *datetime)
break;
default:
- elog(ABORT, "Datetime units '%s' not supported", lowunits);
+ elog(ERROR, "Datetime units '%s' not supported", lowunits);
*result = 0;
}
@@ -1790,28 +1790,28 @@ datetime_part(text *units, DateTime *datetime)
case DTK_DOW:
if (datetime2tm(dt, &tz, tm, &fsec, &tzn) != 0)
- elog(ABORT, "Unable to encode datetime", NULL);
+ elog(ERROR, "Unable to encode datetime", NULL);
*result = j2day(date2j(tm->tm_year, tm->tm_mon, tm->tm_mday));
break;
case DTK_DOY:
if (datetime2tm(dt, &tz, tm, &fsec, &tzn) != 0)
- elog(ABORT, "Unable to encode datetime", NULL);
+ elog(ERROR, "Unable to encode datetime", NULL);
*result = (date2j(tm->tm_year, tm->tm_mon, tm->tm_mday)
- date2j(tm->tm_year, 1, 1) + 1);
break;
default:
- elog(ABORT, "Datetime units '%s' not supported", lowunits);
+ elog(ERROR, "Datetime units '%s' not supported", lowunits);
*result = 0;
}
}
else
{
- elog(ABORT, "Datetime units '%s' not recognized", lowunits);
+ elog(ERROR, "Datetime units '%s' not recognized", lowunits);
*result = 0;
}
}
@@ -1864,7 +1864,7 @@ timespan_part(text *units, TimeSpan *timespan)
if (TIMESPAN_IS_INVALID(*timespan))
{
#if FALSE
- elog(ABORT, "Timespan is not finite", NULL);
+ elog(ERROR, "Timespan is not finite", NULL);
#endif
*result = 0;
@@ -1925,7 +1925,7 @@ timespan_part(text *units, TimeSpan *timespan)
break;
default:
- elog(ABORT, "Timespan units '%s' not yet supported", units);
+ elog(ERROR, "Timespan units '%s' not yet supported", units);
result = NULL;
}
@@ -1949,7 +1949,7 @@ timespan_part(text *units, TimeSpan *timespan)
}
else
{
- elog(ABORT, "Timespan units '%s' not recognized", units);
+ elog(ERROR, "Timespan units '%s' not recognized", units);
*result = 0;
}
@@ -2005,7 +2005,7 @@ datetime_zone(text *zone, DateTime *datetime)
* could return null but Postgres doesn't like that currently. -
* tgl 97/06/12
*/
- elog(ABORT, "Datetime is not finite", NULL);
+ elog(ERROR, "Datetime is not finite", NULL);
result = NULL;
}
@@ -2018,7 +2018,7 @@ datetime_zone(text *zone, DateTime *datetime)
dt = dt2local(dt, tz);
if (datetime2tm(dt, NULL, tm, &fsec, NULL) != 0)
- elog(ABORT, "Datetime not legal", NULL);
+ elog(ERROR, "Datetime not legal", NULL);
up = upzone;
lp = lowzone;
@@ -2039,7 +2039,7 @@ datetime_zone(text *zone, DateTime *datetime)
}
else
{
- elog(ABORT, "Time zone '%s' not recognized", lowzone);
+ elog(ERROR, "Time zone '%s' not recognized", lowzone);
result = NULL;
}
diff --git a/src/backend/utils/adt/filename.c b/src/backend/utils/adt/filename.c
index 267689dc2ee..1039de0b3c7 100644
--- a/src/backend/utils/adt/filename.c
+++ b/src/backend/utils/adt/filename.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.12 1998/01/05 03:34:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.13 1998/01/05 16:39:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,7 +48,7 @@ filename_in(char *file)
if ((pw = getpwnam(userName)) == NULL)
{
- elog(ABORT, "User %s is not a Unix user on the db server.",
+ elog(ERROR, "User %s is not a Unix user on the db server.",
userName);
}
@@ -77,7 +77,7 @@ filename_in(char *file)
/* printf("name: %s\n"); */
if ((pw = getpwnam(name)) == NULL)
{
- elog(ABORT, "No such user: %s\n", name);
+ elog(ERROR, "No such user: %s\n", name);
ind = 0;
}
else
@@ -112,7 +112,7 @@ filename_in(char *file)
}
else
{
- elog(ABORT, "Couldn't find %s in your environment", environment);
+ elog(ERROR, "Couldn't find %s in your environment", environment);
}
}
else
@@ -132,6 +132,6 @@ filename_out(char *s)
return ((char *) NULL);
ret = (char *) palloc(strlen(s) + 1);
if (!ret)
- elog(ABORT, "filename_out: palloc failed");
+ elog(ERROR, "filename_out: palloc failed");
return (strcpy(ret, s));
}
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index daaee8445f1..022e1557fce 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.25 1998/01/05 03:34:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.26 1998/01/05 16:39:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -161,9 +161,9 @@ CheckFloat4Val(double val)
return;
#else
if (fabs(val) > FLOAT4_MAX)
- elog(ABORT, "Bad float4 input format -- overflow");
+ elog(ERROR, "Bad float4 input format -- overflow");
if (val != 0.0 && fabs(val) < FLOAT4_MIN)
- elog(ABORT, "Bad float4 input format -- underflow");
+ elog(ERROR, "Bad float4 input format -- underflow");
return;
#endif /* UNSAFE_FLOATS */
}
@@ -186,9 +186,9 @@ CheckFloat8Val(double val)
return;
#else
if (fabs(val) > FLOAT8_MAX)
- elog(ABORT, "Bad float8 input format -- overflow");
+ elog(ERROR, "Bad float8 input format -- overflow");
if (val != 0.0 && fabs(val) < FLOAT8_MIN)
- elog(ABORT, "Bad float8 input format -- underflow");
+ elog(ERROR, "Bad float8 input format -- underflow");
return;
#endif /* UNSAFE_FLOATS */
}
@@ -210,7 +210,7 @@ float4in(char *num)
errno = 0;
val = strtod(num, &endptr);
if (*endptr != '\0' || errno == ERANGE)
- elog(ABORT, "Bad float4 input format '%s'", num);
+ elog(ERROR, "Bad float4 input format '%s'", num);
/*
* if we get here, we have a legal double, still need to check to see
@@ -257,7 +257,7 @@ float8in(char *num)
errno = 0;
val = strtod(num, &endptr);
if (*endptr != '\0' || errno == ERANGE)
- elog(ABORT, "Bad float8 input format '%s'", num);
+ elog(ERROR, "Bad float8 input format '%s'", num);
CheckFloat8Val(val);
*result = val;
@@ -515,7 +515,7 @@ float4div(float32 arg1, float32 arg2)
return (float32) NULL;
if (*arg2 == 0.0)
- elog(ABORT, "float4div: divide by zero error");
+ elog(ERROR, "float4div: divide by zero error");
val = *arg1 / *arg2;
@@ -609,7 +609,7 @@ float8div(float64 arg1, float64 arg2)
result = (float64) palloc(sizeof(float64data));
if (*arg2 == 0.0)
- elog(ABORT, "float8div: divide by zero error");
+ elog(ERROR, "float8div: divide by zero error");
val = *arg1 / *arg2;
CheckFloat8Val(val);
@@ -806,10 +806,10 @@ dtoi4(float64 num)
int32 result;
if (!PointerIsValid(num))
- elog(ABORT, "dtoi4: unable to convert null", NULL);
+ elog(ERROR, "dtoi4: unable to convert null", NULL);
if ((*num < INT_MIN) || (*num > INT_MAX))
- elog(ABORT, "dtoi4: integer out of range", NULL);
+ elog(ERROR, "dtoi4: integer out of range", NULL);
result = rint(*num);
return (result);
@@ -825,10 +825,10 @@ dtoi2(float64 num)
int16 result;
if (!PointerIsValid(num))
- elog(ABORT, "dtoi2: unable to convert null", NULL);
+ elog(ERROR, "dtoi2: unable to convert null", NULL);
if ((*num < SHRT_MIN) || (*num > SHRT_MAX))
- elog(ABORT, "dtoi2: integer out of range", NULL);
+ elog(ERROR, "dtoi2: integer out of range", NULL);
result = rint(*num);
return (result);
@@ -874,10 +874,10 @@ ftoi4(float32 num)
int32 result;
if (!PointerIsValid(num))
- elog(ABORT, "ftoi4: unable to convert null", NULL);
+ elog(ERROR, "ftoi4: unable to convert null", NULL);
if ((*num < INT_MIN) || (*num > INT_MAX))
- elog(ABORT, "ftoi4: integer out of range", NULL);
+ elog(ERROR, "ftoi4: integer out of range", NULL);
result = rint(*num);
return (result);
@@ -893,10 +893,10 @@ ftoi2(float32 num)
int16 result;
if (!PointerIsValid(num))
- elog(ABORT, "ftoi2: unable to convert null", NULL);
+ elog(ERROR, "ftoi2: unable to convert null", NULL);
if ((*num < SHRT_MIN) || (*num > SHRT_MAX))
- elog(ABORT, "ftoi2: integer out of range", NULL);
+ elog(ERROR, "ftoi2: integer out of range", NULL);
result = rint(*num);
return (result);
@@ -1052,7 +1052,7 @@ dpow(float64 arg1, float64 arg2)
#else
if (!finite(*result))
#endif
- elog(ABORT, "pow() result is out of range");
+ elog(ERROR, "pow() result is out of range");
CheckFloat8Val(*result);
return (result);
@@ -1083,7 +1083,7 @@ dexp(float64 arg1)
#else
if (!finite(*result))
#endif
- elog(ABORT, "exp() result is out of range");
+ elog(ERROR, "exp() result is out of range");
CheckFloat8Val(*result);
return (result);
@@ -1107,9 +1107,9 @@ dlog1(float64 arg1)
tmp = *arg1;
if (tmp == 0.0)
- elog(ABORT, "can't take log of zero");
+ elog(ERROR, "can't take log of zero");
if (tmp < 0)
- elog(ABORT, "can't take log of a negative number");
+ elog(ERROR, "can't take log of a negative number");
*result = (float64data) log(tmp);
CheckFloat8Val(*result);
@@ -1185,7 +1185,7 @@ float48div(float32 arg1, float64 arg2)
result = (float64) palloc(sizeof(float64data));
if (*arg2 == 0.0)
- elog(ABORT, "float48div: divide by zero");
+ elog(ERROR, "float48div: divide by zero");
*result = *arg1 / *arg2;
CheckFloat8Val(*result);
@@ -1255,7 +1255,7 @@ float84div(float64 arg1, float32 arg2)
result = (float64) palloc(sizeof(float64data));
if (*arg2 == 0.0)
- elog(ABORT, "float48div: divide by zero");
+ elog(ERROR, "float48div: divide by zero");
*result = *arg1 / *arg2;
CheckFloat8Val(*result);
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index ff19149d902..50f87bd4971 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.27 1998/01/05 03:34:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.28 1998/01/05 16:40:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -294,7 +294,7 @@ path_encode(bool closed, int npts, Point *pt)
{
*cp++ = LDELIM;
if (!pair_encode(pt->x, pt->y, cp))
- elog(ABORT, "Unable to format path", NULL);
+ elog(ERROR, "Unable to format path", NULL);
cp += strlen(cp);
*cp++ = RDELIM;
*cp++ = DELIM;
@@ -364,11 +364,11 @@ box_in(char *str)
y;
if (!PointerIsValid(str))
- elog(ABORT, " Bad (null) box external representation", NULL);
+ elog(ERROR, " Bad (null) box external representation", NULL);
if ((!path_decode(FALSE, 2, str, &isopen, &s, &(box->high)))
|| (*s != '\0'))
- elog(ABORT, "Bad box external representation '%s'", str);
+ elog(ERROR, "Bad box external representation '%s'", str);
/* reorder corners if necessary... */
if (box->high.x < box->low.x)
@@ -1058,10 +1058,10 @@ path_in(char *str)
int depth = 0;
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) path external representation");
+ elog(ERROR, "Bad (null) path external representation");
if ((npts = pair_count(str, ',')) <= 0)
- elog(ABORT, "Bad path external representation '%s'", str);
+ elog(ERROR, "Bad path external representation '%s'", str);
s = str;
while (isspace(*s))
@@ -1082,7 +1082,7 @@ path_in(char *str)
if ((!path_decode(TRUE, npts, s, &isopen, &s, &(path->p[0])))
&& (!((depth == 0) && (*s == '\0'))) && !((depth >= 1) && (*s == RDELIM)))
- elog(ABORT, "Bad path external representation '%s'", str);
+ elog(ERROR, "Bad path external representation '%s'", str);
path->closed = (!isopen);
@@ -1367,10 +1367,10 @@ point_in(char *str)
char *s;
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) point external representation");
+ elog(ERROR, "Bad (null) point external representation");
if (!pair_decode(str, &x, &y, &s) || (strlen(s) > 0))
- elog(ABORT, "Bad point external representation '%s'", str);
+ elog(ERROR, "Bad point external representation '%s'", str);
point = PALLOCTYPE(Point);
@@ -1549,13 +1549,13 @@ lseg_in(char *str)
char *s;
if (!PointerIsValid(str))
- elog(ABORT, " Bad (null) lseg external representation", NULL);
+ elog(ERROR, " Bad (null) lseg external representation", NULL);
lseg = PALLOCTYPE(LSEG);
if ((!path_decode(TRUE, 2, str, &isopen, &s, &(lseg->p[0])))
|| (*s != '\0'))
- elog(ABORT, "Bad lseg external representation '%s'", str);
+ elog(ERROR, "Bad lseg external representation '%s'", str);
lseg->m = point_sl(&lseg->p[0], &lseg->p[1]);
@@ -2037,7 +2037,7 @@ dist_cpoly(CIRCLE *circle, POLYGON *poly)
LSEG seg;
if (!PointerIsValid(circle) || !PointerIsValid(poly))
- elog(ABORT, "Invalid (null) input for distance", NULL);
+ elog(ERROR, "Invalid (null) input for distance", NULL);
if (point_inside(&(circle->center), poly->npts, poly->p))
{
@@ -2242,7 +2242,7 @@ Point *
close_pb(Point *pt, BOX *box)
{
/* think about this one for a while */
- elog(ABORT, "close_pb not implemented", NULL);
+ elog(ERROR, "close_pb not implemented", NULL);
return (NULL);
}
@@ -2273,7 +2273,7 @@ Point *
close_sb(LSEG *lseg, BOX *box)
{
/* think about this one for a while */
- elog(ABORT, "close_sb not implemented", NULL);
+ elog(ERROR, "close_sb not implemented", NULL);
return (NULL);
}
@@ -2282,7 +2282,7 @@ Point *
close_lb(LINE *line, BOX *box)
{
/* think about this one for a while */
- elog(ABORT, "close_lb not implemented", NULL);
+ elog(ERROR, "close_lb not implemented", NULL);
return (NULL);
}
@@ -2531,7 +2531,7 @@ make_bound_box(POLYGON *poly)
}
else
{
- elog(ABORT, "Unable to create bounding box for empty polygon", NULL);
+ elog(ERROR, "Unable to create bounding box for empty polygon", NULL);
}
}
@@ -2553,10 +2553,10 @@ poly_in(char *str)
char *s;
if (!PointerIsValid(str))
- elog(ABORT, " Bad (null) polygon external representation");
+ elog(ERROR, " Bad (null) polygon external representation");
if ((npts = pair_count(str, ',')) <= 0)
- elog(ABORT, "Bad polygon external representation '%s'", str);
+ elog(ERROR, "Bad polygon external representation '%s'", str);
size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * npts);
poly = PALLOC(size);
@@ -2567,7 +2567,7 @@ poly_in(char *str)
if ((!path_decode(FALSE, npts, str, &isopen, &s, &(poly->p[0])))
|| (*s != '\0'))
- elog(ABORT, "Bad polygon external representation '%s'", str);
+ elog(ERROR, "Bad polygon external representation '%s'", str);
make_bound_box(poly);
@@ -2870,7 +2870,7 @@ point_div(Point *p1, Point *p2)
div = (p2->x * p2->x) + (p2->y * p2->y);
if (div == 0.0)
- elog(ABORT, "point_div: divide by 0.0 error");
+ elog(ERROR, "point_div: divide by 0.0 error");
result->x = ((p1->x * p2->x) + (p1->y * p2->y)) / div;
result->y = ((p2->x * p1->y) - (p2->y * p1->x)) / div;
@@ -3139,7 +3139,7 @@ path_center(PATH *path)
if (!PointerIsValid(path))
return (NULL);
- elog(ABORT, "path_center not implemented", NULL);
+ elog(ERROR, "path_center not implemented", NULL);
result = PALLOCTYPE(Point);
result = NULL;
@@ -3158,7 +3158,7 @@ path_poly(PATH *path)
return (NULL);
if (!path->closed)
- elog(ABORT, "Open path cannot be converted to polygon", NULL);
+ elog(ERROR, "Open path cannot be converted to polygon", NULL);
size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * path->npts);
poly = PALLOC(size);
@@ -3197,7 +3197,7 @@ upgradepath(PATH *path)
return (NULL);
if (!isoldpath(path))
- elog(ABORT, "upgradepath: path already upgraded?", NULL);
+ elog(ERROR, "upgradepath: path already upgraded?", NULL);
npts = (path->npts - 1);
size = offsetof(PATH, p[0]) +(sizeof(path->p[0]) * npts);
@@ -3463,7 +3463,7 @@ circle_in(char *str)
int depth = 0;
if (!PointerIsValid(str))
- elog(ABORT, " Bad (null) circle external representation", NULL);
+ elog(ERROR, " Bad (null) circle external representation", NULL);
circle = PALLOCTYPE(CIRCLE);
@@ -3483,7 +3483,7 @@ circle_in(char *str)
}
if (!pair_decode(s, &circle->center.x, &circle->center.y, &s))
- elog(ABORT, "Bad circle external representation '%s'", str);
+ elog(ERROR, "Bad circle external representation '%s'", str);
if (*s == DELIM)
s++;
@@ -3491,7 +3491,7 @@ circle_in(char *str)
s++;
if ((!single_decode(s, &circle->radius, &s)) || (circle->radius < 0))
- elog(ABORT, "Bad circle external representation '%s'", str);
+ elog(ERROR, "Bad circle external representation '%s'", str);
while (depth > 0)
{
@@ -3505,12 +3505,12 @@ circle_in(char *str)
}
else
{
- elog(ABORT, "Bad circle external representation '%s'", str);
+ elog(ERROR, "Bad circle external representation '%s'", str);
}
}
if (*s != '\0')
- elog(ABORT, "Bad circle external representation '%s'", str);
+ elog(ERROR, "Bad circle external representation '%s'", str);
return (circle);
} /* circle_in() */
@@ -3532,13 +3532,13 @@ circle_out(CIRCLE *circle)
*cp++ = LDELIM_C;
*cp++ = LDELIM;
if (!pair_encode(circle->center.x, circle->center.y, cp))
- elog(ABORT, "Unable to format circle", NULL);
+ elog(ERROR, "Unable to format circle", NULL);
cp += strlen(cp);
*cp++ = RDELIM;
*cp++ = DELIM;
if (!single_encode(circle->radius, cp))
- elog(ABORT, "Unable to format circle", NULL);
+ elog(ERROR, "Unable to format circle", NULL);
cp += strlen(cp);
*cp++ = RDELIM_C;
@@ -4000,7 +4000,7 @@ circle_poly(int npts, CIRCLE *circle)
return (NULL);
if (FPzero(circle->radius) || (npts < 2))
- elog(ABORT, "Unable to convert circle to polygon", NULL);
+ elog(ERROR, "Unable to convert circle to polygon", NULL);
size = offsetof(POLYGON, p[0]) +(sizeof(poly->p[0]) * npts);
poly = PALLOC(size);
@@ -4036,7 +4036,7 @@ poly_circle(POLYGON *poly)
return (NULL);
if (poly->npts < 2)
- elog(ABORT, "Unable to convert polygon to circle", NULL);
+ elog(ERROR, "Unable to convert polygon to circle", NULL);
circle = PALLOCTYPE(CIRCLE);
@@ -4059,7 +4059,7 @@ poly_circle(POLYGON *poly)
circle->radius /= poly->npts;
if (FPzero(circle->radius))
- elog(ABORT, "Unable to convert polygon to circle", NULL);
+ elog(ERROR, "Unable to convert polygon to circle", NULL);
return (circle);
} /* poly_circle() */
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index 41aa26b6b84..c33920e8510 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.11 1998/01/05 03:34:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.12 1998/01/05 16:40:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -232,9 +232,9 @@ int16
i4toi2(int32 arg1)
{
if (arg1 < SHRT_MIN)
- elog(ABORT, "i4toi2: '%d' causes int2 underflow", arg1);
+ elog(ERROR, "i4toi2: '%d' causes int2 underflow", arg1);
if (arg1 > SHRT_MAX)
- elog(ABORT, "i4toi2: '%d' causes int2 overflow", arg1);
+ elog(ERROR, "i4toi2: '%d' causes int2 overflow", arg1);
return ((int16) arg1);
}
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index a1607246d20..f35940c4fb5 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.37 1998/01/05 03:34:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.38 1998/01/05 16:40:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -256,14 +256,14 @@ nabstimein(char *str)
ftype[MAXDATEFIELDS];
if (!PointerIsValid(str))
- elog(ABORT, "Bad (null) abstime external representation", NULL);
+ elog(ERROR, "Bad (null) abstime external representation", NULL);
if (strlen(str) > MAXDATELEN)
- elog(ABORT, "Bad (length) abstime external representation '%s'", str);
+ elog(ERROR, "Bad (length) abstime external representation '%s'", str);
if ((ParseDateTime(str, lowstr, field, ftype, MAXDATEFIELDS, &nf) != 0)
|| (DecodeDateTime(field, ftype, nf, &dtype, tm, &fsec, &tz) != 0))
- elog(ABORT, "Bad abstime external representation '%s'", str);
+ elog(ERROR, "Bad abstime external representation '%s'", str);
#ifdef DATEDEBUG
printf("nabstimein- %d fields are type %d (DTK_DATE=%d)\n", nf, dtype, DTK_DATE);
@@ -296,7 +296,7 @@ nabstimein(char *str)
break;
default:
- elog(ABORT, "Bad abstime (internal coding error) '%s'", str);
+ elog(ERROR, "Bad abstime (internal coding error) '%s'", str);
result = INVALID_ABSTIME;
break;
};
@@ -547,7 +547,7 @@ abstime_datetime(AbsoluteTime abstime)
DateTime *result;
if (!PointerIsValid(result = PALLOCTYPE(DateTime)))
- elog(ABORT, "Unable to allocate space to convert abstime to datetime", NULL);
+ elog(ERROR, "Unable to allocate space to convert abstime to datetime", NULL);
switch (abstime)
{
diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c
index 7cbdd7d48c1..ca17d7dc302 100644
--- a/src/backend/utils/adt/numutils.c
+++ b/src/backend/utils/adt/numutils.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.20 1998/01/05 03:34:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.21 1998/01/05 16:40:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -58,9 +58,9 @@ pg_atoi(char *s, int size, int c)
errno = 0;
l = strtol(s, &badp, 10);
if (errno) /* strtol must set ERANGE */
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
if (badp && *badp && (*badp != c))
- elog(ABORT, "pg_atoi: error in \"%s\": can\'t parse \"%s\"", s, badp);
+ elog(ERROR, "pg_atoi: error in \"%s\": can\'t parse \"%s\"", s, badp);
switch (size)
{
@@ -70,12 +70,12 @@ pg_atoi(char *s, int size, int c)
if (l < INT_MIN)
{
errno = ERANGE;
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
if (l > INT_MAX)
{
errno = ERANGE;
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
#endif /* HAS_LONG_LONG */
break;
@@ -83,28 +83,28 @@ pg_atoi(char *s, int size, int c)
if (l < SHRT_MIN)
{
errno = ERANGE;
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
if (l > SHRT_MAX)
{
errno = ERANGE;
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
break;
case sizeof(int8):
if (l < SCHAR_MIN)
{
errno = ERANGE;
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
if (l > SCHAR_MAX)
{
errno = ERANGE;
- elog(ABORT, "pg_atoi: error reading \"%s\": %m", s);
+ elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
break;
default:
- elog(ABORT, "pg_atoi: invalid result size: %d", size);
+ elog(ERROR, "pg_atoi: invalid result size: %d", size);
}
return ((int32) l);
}
diff --git a/src/backend/utils/adt/oidname.c b/src/backend/utils/adt/oidname.c
index f4a4d72d352..6cfa44e36a3 100644
--- a/src/backend/utils/adt/oidname.c
+++ b/src/backend/utils/adt/oidname.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.10 1998/01/05 03:34:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidname.c,v 1.11 1998/01/05 16:40:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,7 +40,7 @@ oidnamein(char *inStr)
StrNCpy(oc->name.data, inptr, NAMEDATALEN);
}
else
- elog(ABORT, "Bad input data for type oidname");
+ elog(ERROR, "Bad input data for type oidname");
return oc;
}
diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c
index 074e0a695c5..024e46b5cac 100644
--- a/src/backend/utils/adt/regexp.c
+++ b/src/backend/utils/adt/regexp.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.12 1998/01/05 03:34:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.13 1998/01/05 16:40:11 momjian Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
@@ -157,7 +157,7 @@ RE_compile_and_execute(struct varlena * text_re, char *text, int cflags)
rev[oldest].cre_s = (char *) NULL;
pg95_regerror(regcomp_result, &rev[oldest].cre_re, errMsg,
sizeof(errMsg));
- elog(ABORT, "regcomp failed with error %s", errMsg);
+ elog(ERROR, "regcomp failed with error %s", errMsg);
}
/* not reached */
diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c
index ee36f1ea343..18d93d4a825 100644
--- a/src/backend/utils/adt/regproc.c
+++ b/src/backend/utils/adt/regproc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.11 1998/01/05 03:34:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.12 1998/01/05 16:40:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,7 +45,7 @@ regprocin(char *proname)
proc = heap_openr(ProcedureRelationName);
if (!RelationIsValid(proc))
{
- elog(ABORT, "regprocin: could not open %s",
+ elog(ERROR, "regprocin: could not open %s",
ProcedureRelationName);
return (0);
}
@@ -59,7 +59,7 @@ regprocin(char *proname)
if (!HeapScanIsValid(procscan))
{
heap_close(proc);
- elog(ABORT, "regprocin: could not being scan of %s",
+ elog(ERROR, "regprocin: could not being scan of %s",
ProcedureRelationName);
return (0);
}
@@ -104,7 +104,7 @@ regprocout(RegProcedure proid)
proc = heap_openr(ProcedureRelationName);
if (!RelationIsValid(proc))
{
- elog(ABORT, "regprocout: could not open %s",
+ elog(ERROR, "regprocout: could not open %s",
ProcedureRelationName);
return (0);
}
@@ -118,7 +118,7 @@ regprocout(RegProcedure proid)
if (!HeapScanIsValid(procscan))
{
heap_close(proc);
- elog(ABORT, "regprocout: could not being scan of %s",
+ elog(ERROR, "regprocout: could not being scan of %s",
ProcedureRelationName);
return (0);
}
@@ -176,7 +176,7 @@ oid8types(Oid (*oidArray)[])
type = heap_openr(TypeRelationName);
if (!RelationIsValid(type))
{
- elog(ABORT, "int8typeout: could not open %s",
+ elog(ERROR, "int8typeout: could not open %s",
TypeRelationName);
return (0);
}
@@ -196,7 +196,7 @@ oid8types(Oid (*oidArray)[])
if (!HeapScanIsValid(typescan))
{
heap_close(type);
- elog(ABORT, "int8typeout: could not being scan of %s",
+ elog(ERROR, "int8typeout: could not being scan of %s",
TypeRelationName);
return (0);
}
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 02d818c15be..3c55fdbed6c 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.13 1998/01/05 03:34:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.14 1998/01/05 16:40:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -287,7 +287,7 @@ getattdisbursion(Oid relid, AttrNumber attnum)
0, 0);
if (!HeapTupleIsValid(atp))
{
- elog(ABORT, "getattdisbursion: no attribute tuple %d %d",
+ elog(ERROR, "getattdisbursion: no attribute tuple %d %d",
relid, attnum);
return (0);
}
@@ -304,7 +304,7 @@ getattdisbursion(Oid relid, AttrNumber attnum)
*/
if (!HeapTupleIsValid(atp))
{
- elog(ABORT, "getattdisbursion: no relation tuple %d", relid);
+ elog(ERROR, "getattdisbursion: no relation tuple %d", relid);
return (0);
}
ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;
@@ -357,7 +357,7 @@ gethilokey(Oid relid,
*low = "n";
/*
- * XXX elog(ABORT, "gethilokey: statistic tuple not
+ * XXX elog(ERROR, "gethilokey: statistic tuple not
* found");
*/
return;
@@ -417,9 +417,9 @@ btreesel(Oid operatorObjectId,
}
if (!PointerIsValid(result))
- elog(ABORT, "Btree Selectivity: bad pointer");
+ elog(ERROR, "Btree Selectivity: bad pointer");
if (*result < 0.0 || *result > 1.0)
- elog(ABORT, "Btree Selectivity: bad value %lf", *result);
+ elog(ERROR, "Btree Selectivity: bad value %lf", *result);
return (result);
}
@@ -465,7 +465,7 @@ btreenpage(Oid operatorObjectId,
0, 0, 0);
if (!HeapTupleIsValid(atp))
{
- elog(ABORT, "btreenpage: no index tuple %d", indexrelid);
+ elog(ERROR, "btreenpage: no index tuple %d", indexrelid);
return (0);
}
@@ -503,7 +503,7 @@ hashsel(Oid operatorObjectId,
0, 0, 0);
if (!HeapTupleIsValid(atp))
{
- elog(ABORT, "hashsel: no index tuple %d", indexrelid);
+ elog(ERROR, "hashsel: no index tuple %d", indexrelid);
return (0);
}
ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;
@@ -530,9 +530,9 @@ hashsel(Oid operatorObjectId,
}
if (!PointerIsValid(result))
- elog(ABORT, "Hash Table Selectivity: bad pointer");
+ elog(ERROR, "Hash Table Selectivity: bad pointer");
if (*result < 0.0 || *result > 1.0)
- elog(ABORT, "Hash Table Selectivity: bad value %lf", *result);
+ elog(ERROR, "Hash Table Selectivity: bad value %lf", *result);
return (result);
@@ -559,7 +559,7 @@ hashnpage(Oid operatorObjectId,
0, 0, 0);
if (!HeapTupleIsValid(atp))
{
- elog(ABORT, "hashsel: no index tuple %d", indexrelid);
+ elog(ERROR, "hashsel: no index tuple %d", indexrelid);
return (0);
}
diff --git a/src/backend/utils/adt/sets.c b/src/backend/utils/adt/sets.c
index 2fcc27c9046..de2306815bd 100644
--- a/src/backend/utils/adt/sets.c
+++ b/src/backend/utils/adt/sets.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.10 1998/01/05 03:34:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.11 1998/01/05 16:40:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -90,7 +90,7 @@ SetDefine(char *querystr, char *typename)
ObjectIdGetDatum(setoid),
0, 0, 0);
if (!HeapTupleIsValid(tup))
- elog(ABORT, "setin: unable to define set %s", querystr);
+ elog(ERROR, "setin: unable to define set %s", querystr);
/*
* We can tell whether the set was already defined by checking the
@@ -145,7 +145,7 @@ SetDefine(char *querystr, char *typename)
setoid = newtup->t_oid;
}
else
- elog(ABORT, "setin: could not find new set oid tuple");
+ elog(ERROR, "setin: could not find new set oid tuple");
heap_endscan(pg_proc_scan);
if (RelationGetRelationTupleForm(procrel)->relhasindex)
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index 2b2d8c65d80..78cae3f1f8e 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.15 1998/01/05 03:34:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.16 1998/01/05 16:40:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,7 +75,7 @@ bpcharin(char *s, int dummy, int typlen)
}
if (len > 4096)
- elog(ABORT, "bpcharin: length of char() must be less than 4096");
+ elog(ERROR, "bpcharin: length of char() must be less than 4096");
result = (char *) palloc(typlen);
*(int32 *) result = typlen;
@@ -145,7 +145,7 @@ varcharin(char *s, int dummy, int typlen)
}
if (len > 4096)
- elog(ABORT, "varcharin: length of char() must be less than 4096");
+ elog(ERROR, "varcharin: length of char() must be less than 4096");
result = (char *) palloc(typlen);
*(int32 *) result = typlen;
@@ -199,7 +199,7 @@ int32
bpcharlen(char *arg)
{
if (!PointerIsValid(arg))
- elog(ABORT, "Bad (null) char() external representation", NULL);
+ elog(ERROR, "Bad (null) char() external representation", NULL);
return(bcTruelen(arg));
} /* bpcharlen() */
@@ -355,7 +355,7 @@ int32
varcharlen(char *arg)
{
if (!PointerIsValid(arg))
- elog(ABORT, "Bad (null) varchar() external representation", NULL);
+ elog(ERROR, "Bad (null) varchar() external representation", NULL);
return(vcTruelen(arg));
} /* vclen() */
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index b1fde3f8124..092dee702a8 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.27 1998/01/05 03:34:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.28 1998/01/05 16:40:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,7 @@
*
* Non-printable characters must be passed as '\nnn' (octal) and are
* converted to internal form. '\' must be passed as '\\'.
- * elog(ABORT, ...) if bad form.
+ * elog(ERROR, ...) if bad form.
*
* BUGS:
* The input is scaned twice.
@@ -46,7 +46,7 @@ byteain(char *inputText)
text *result;
if (inputText == NULL)
- elog(ABORT, "Bad input string for type bytea");
+ elog(ERROR, "Bad input string for type bytea");
for (byte = 0, tp = inputText; *tp != '\0'; byte++)
if (*tp++ == '\\')
@@ -56,7 +56,7 @@ byteain(char *inputText)
else if (!isdigit(*tp++) ||
!isdigit(*tp++) ||
!isdigit(*tp++))
- elog(ABORT, "Bad input string for type bytea");
+ elog(ERROR, "Bad input string for type bytea");
}
tp = inputText;
byte += VARHDRSZ;
@@ -195,7 +195,7 @@ int32
textlen(text *t)
{
if (!PointerIsValid(t))
- elog(ABORT,"Null input to textlen");
+ elog(ERROR,"Null input to textlen");
return (VARSIZE(t) - VARHDRSZ);
} /* textlen() */
@@ -537,7 +537,7 @@ byteaGetByte(text *v, int32 n)
if (n >= len)
{
- elog(ABORT, "byteaGetByte: index (=%d) out of range [0..%d]",
+ elog(ERROR, "byteaGetByte: index (=%d) out of range [0..%d]",
n, len - 1);
}
@@ -595,7 +595,7 @@ byteaSetByte(text *v, int32 n, int32 newByte)
if (n >= len)
{
- elog(ABORT,
+ elog(ERROR,
"byteaSetByte: index (=%d) out of range [0..%d]",
n, len - 1);
}
@@ -606,7 +606,7 @@ byteaSetByte(text *v, int32 n, int32 newByte)
res = (text *) palloc(VARSIZE(v));
if (res == NULL)
{
- elog(ABORT, "byteaSetByte: Out of memory (%d bytes requested)",
+ elog(ERROR, "byteaSetByte: Out of memory (%d bytes requested)",
VARSIZE(v));
}
memmove((char *) res, (char *) v, VARSIZE(v));
@@ -641,7 +641,7 @@ byteaSetBit(text *v, int32 n, int32 newBit)
*/
if (newBit != 0 && newBit != 1)
{
- elog(ABORT, "byteaSetByte: new bit must be 0 or 1");
+ elog(ERROR, "byteaSetByte: new bit must be 0 or 1");
}
/*