Minor fixups for psql's process_file() function.
Robert Haas <rhaas@postgresql.org>
Minor fixups for psql's process_file() function. - Avoid closing stdin, since we didn't open it. Previously multiple inclusions of stdin would be terminated with a single quit, now a separate quit is needed for each invocation. Previous behavior also accessed stdin after it was fclose()d, which is undefined behavior per ANSI C. - Properly restore pset.inputfile, since the caller expects to be able to free that memory. Marti Raudsepp
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/psql/command.c | modified | +12 −3 |