We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6faa334 commit e4cd186Copy full SHA for e4cd186
src/backend/utils/adt/genfile.c
@@ -9,7 +9,7 @@
9
* Author: Andreas Pflug <pgadmin@pse-consulting.de>
10
*
11
* IDENTIFICATION
12
- * $PostgreSQL: pgsql/src/backend/utils/adt/genfile.c,v 1.7 2005/10/15 02:49:28 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/genfile.c,v 1.8 2005/10/15 19:47:09 tgl Exp $
13
14
*-------------------------------------------------------------------------
15
*/
@@ -134,7 +134,7 @@ pg_read_file(PG_FUNCTION_ARGS)
134
135
nbytes = fread(VARDATA(buf), 1, (size_t) bytes_to_read, file);
136
137
- if (nbytes < 0)
+ if (ferror(file))
138
ereport(ERROR,
139
(errcode_for_file_access(),
140
errmsg("could not read file \"%s\": %m", filename)));
0 commit comments