1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Change some ABORTS to ERROR. Add line number when COPY Failure.

This commit is contained in:
Bruce Momjian
1998-01-05 16:40:20 +00:00
parent 3d8820a364
commit deea69b90e
44 changed files with 571 additions and 589 deletions

View File

@@ -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);