Re: How would I get rid of trailing blank line?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)edu>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How would I get rid of trailing blank line?
Date: 2009-04-02 23:01:21
Message-ID: 14638.1238713281@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

"Tena Sakai" <tsakai(at)gallo(dot)ucsf(dot)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 :-(

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sam Mason 2009-04-03 00:33:56 Re: [HACKERS] string_to_array with empty input
Previous Message Tena Sakai 2009-04-02 21:33:52 How would I get rid of trailing blank line?

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Willis 2009-04-02 23:22:06 Re: FUNCTION problem
Previous Message Adrian Klaver 2009-04-02 22:20:11 Re: FUNCTION problem