Fix a couple of places that would loop forever if attempts to read a stdio file
Tom Lane <tgl@sss.pgh.pa.us>
Fix a couple of places that would loop forever if attempts to read a stdio file set ferror() but never set feof(). This is known to be the case for recent glibc when trying to read a directory as a file, and might be true for other platforms/cases too. Per report from Ed L. (There is more that we ought to do about his report, but this is one easily identifiable issue.)
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copy.c | modified | +2 −2 |
| src/backend/libpq/hba.c | modified | +2 −2 |
| src/interfaces/libpq/fe-connect.c | modified | +2 −2 |