Code and docs review for multiple -c and -f options in psql.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: fcbbf82d2b6caf7b156f2ec35b322e23caf1e99e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-12-13T19:52:07Z
Releases: 9.6.0
Code and docs review for multiple -c and -f options in psql.

Commit d5563d7df94488bf drew complaints from Coverity, which quite
correctly complained that one copy of each -c or -f string was being
leaked.  What's more, simple_action_list_append was allocating enough space
for still a third copy of each string as part of the SimpleActionListCell,
even though that coding method had been superseded by a separate strdup
operation.  There were some other minor coding infelicities too.  The
documentation needed more work as well, eg it forgot to explain that -c
causes psql not to accept any interactive input.

Files

PathChange+/−
doc/src/sgml/ref/psql-ref.sgml modified +79 −61
src/bin/psql/startup.c modified +42 −51

Documentation touched