mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
Change elog(WARN) to elog(ERROR) and elog(ABORT).
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.3 1997/09/08 02:41:09 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.4 1998/01/05 03:35:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -34,10 +34,10 @@ beard(Oid picture)
|
||||
int cc;
|
||||
|
||||
if ((pic_fd = lo_open(picture, INV_READ)) == -1)
|
||||
elog(WARN, "Cannot access picture large object");
|
||||
elog(ABORT, "Cannot access picture large object");
|
||||
|
||||
if (lo_read(pic_fd, (char *) &ihdr, sizeof(ihdr)) != sizeof(ihdr))
|
||||
elog(WARN, "Picture large object corrupted");
|
||||
elog(ABORT, "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(WARN, "Cannot create new large object");
|
||||
elog(ABORT, "Cannot create new large object");
|
||||
|
||||
if ((beard_fd = lo_open(beard, INV_WRITE)) == -1)
|
||||
elog(WARN, "Cannot access beard large object");
|
||||
elog(ABORT, "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(WARN, "error while writing large object");
|
||||
elog(ABORT, "error while writing large object");
|
||||
}
|
||||
|
||||
lo_close(pic_fd);
|
||||
|
@ -45,7 +45,7 @@ complex_in(char *str)
|
||||
|
||||
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2)
|
||||
{
|
||||
elog(WARN, "complex_in: error in parsing \"%s\"", str);
|
||||
elog(ABORT, "complex_in: error in parsing \"%s\"", str);
|
||||
return NULL;
|
||||
}
|
||||
result = (Complex *) palloc(sizeof(Complex));
|
||||
|
Reference in New Issue
Block a user