Re: psql -f doesn't complain about directories - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql -f doesn't complain about directories
Date
Msg-id 4453.1195146194@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql -f doesn't complain about directories  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: psql -f doesn't complain about directories  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: psql -f doesn't complain about directories
Next
From: Tom Lane
Date:
Subject: Heads up: 8.3beta3 to be wrapped this evening