aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/C-code
diff options
context:
space:
mode:
Diffstat (limited to 'src/tutorial/C-code')
-rw-r--r--src/tutorial/C-code/beard.c12
-rw-r--r--src/tutorial/C-code/complex.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/tutorial/C-code/beard.c b/src/tutorial/C-code/beard.c
index 3c73d237784..6e11ddea856 100644
--- a/src/tutorial/C-code/beard.c
+++ b/src/tutorial/C-code/beard.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.4 1998/01/05 03:35:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.5 1998/01/07 21:07:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,10 +34,10 @@ beard(Oid picture)
int cc;
if ((pic_fd = lo_open(picture, INV_READ)) == -1)
- elog(ABORT, "Cannot access picture large object");
+ elog(ERROR, "Cannot access picture large object");
if (lo_read(pic_fd, (char *) &ihdr, sizeof(ihdr)) != sizeof(ihdr))
- elog(ABORT, "Picture large object corrupted");
+ elog(ERROR, "Picture large object corrupted");
beardOffset = (ihdr.size / 3) * 2;
@@ -45,16 +45,16 @@ beard(Oid picture)
* new large object
*/
if ((beard = lo_creat(INV_MD)) == 0) /* ?? is this right? */
- elog(ABORT, "Cannot create new large object");
+ elog(ERROR, "Cannot create new large object");
if ((beard_fd = lo_open(beard, INV_WRITE)) == -1)
- elog(ABORT, "Cannot access beard large object");
+ elog(ERROR, "Cannot access beard large object");
lo_lseek(pic_fd, beardOffset, SET_CUR);
while ((cc = lo_read(pic_fd, buf, BUFSIZE)) > 0)
{
if (lo_write(beard_fd, buf, cc) != cc)
- elog(ABORT, "error while writing large object");
+ elog(ERROR, "error while writing large object");
}
lo_close(pic_fd);
diff --git a/src/tutorial/C-code/complex.c b/src/tutorial/C-code/complex.c
index f697c980cbc..8efbf553918 100644
--- a/src/tutorial/C-code/complex.c
+++ b/src/tutorial/C-code/complex.c
@@ -45,7 +45,7 @@ complex_in(char *str)
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2)
{
- elog(ABORT, "complex_in: error in parsing \"%s\"", str);
+ elog(ERROR, "complex_in: error in parsing \"%s\"", str);
return NULL;
}
result = (Complex *) palloc(sizeof(Complex));