aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/geo_ops.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-01-05 16:40:20 +0000
committerBruce Momjian <bruce@momjian.us>1998-01-05 16:40:20 +0000
commitdeea69b90efa866544de6dd34b6e01c04f09806f (patch)
tree27a30d675e37a94fc384ea9c0cc69062e50c2244 /src/backend/utils/adt/geo_ops.c
parent3d8820a364b3627b537b44b9cb23dc40a3c84144 (diff)
downloadpostgresql-deea69b90efa866544de6dd34b6e01c04f09806f.tar.gz
postgresql-deea69b90efa866544de6dd34b6e01c04f09806f.zip
Change some ABORTS to ERROR. Add line number when COPY Failure.
Diffstat (limited to 'src/backend/utils/adt/geo_ops.c')
-rw-r--r--src/backend/utils/adt/geo_ops.c66
1 files changed, 33 insertions, 33 deletions
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() */