Tom Lane wrote:
"Tena Sakai" <tsa...@gallo.ucsf.edu> writes:
I often use a line like:
  psql -tf query.sql mydatabase > query.out

-t option gets rid of the heading and count
report at the bottom.  There is a blank line
at the bottom, however.  Is there any way to
have psql not give me that blank line?

Doesn't look like it --- the final fputc('\n', fout); seems to be
done unconditionally in all the output formats.  I wonder if we should
change that?  I'm afraid it might break programs that are used to it :-(



Right. There's a simple pipeline way to get rid of it:

   psql -t -f query.sql | sed -e '$d' > query.out


cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to