Skip to content

Commit

Permalink
detailed error message for writefile
Browse files Browse the repository at this point in the history
  • Loading branch information
csimsek committed Dec 24, 2017
1 parent ec59ae6 commit 26fcdf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion writefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Datum fio_writefile(PG_FUNCTION_ARGS) {
}

if ((fd = fopen(filename, "w+")) == NULL) {
elog(ERROR, "cannot open file: %s", filename);
elog(ERROR, "cannot open file: %s (%s)", filename, strerror(errno));
return 0;
}
buffer = text_to_cstring(vcontent);
Expand Down

0 comments on commit 26fcdf1

Please sign in to comment.