Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Am Donnerstag, 15. November 2007 schrieb Tom Lane:
>> This seems too far removed from the scene of the crime
> Yeah, my zeroth attempt was to place this in gets_fromFile(), but there you
> don't have any opportunity to report failure to the main loop. We'd need to
> change the function signature to be able to pass that around. Maybe that's
> better overall.
Well, you could still handle that the same as in your patch: on NULL
return, check ferror. It's just that I don't trust errno to stay
unchanged for very long.
regards, tom lane