pgsql: Minor fixups for psql's process_file() function.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Minor fixups for psql's process_file() function.
Date: 2010-10-26 23:35:48
Message-ID: E1PAt3U-0006oo-FK@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=1fea0c05eb4ac4a21d79471b9a7fe96163306b88

Modified Files
--------------
src/bin/psql/command.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2010-10-27 01:23:49 pgsql: Add a client authentication hook.
Previous Message Heikki Linnakangas 2010-10-26 19:55:06 pgsql: Note explicitly that hash indexes are also not replicated becaus