Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 93EE5638153; Thu, 2 Apr 2009 20:02:01 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96329-09; Thu, 2 Apr 2009 20:01:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 758BB637FF4; Thu, 2 Apr 2009 20:01:24 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n32N1LMC014639; Thu, 2 Apr 2009 19:01:21 -0400 (EDT) To: "Tena Sakai" cc: pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: How would I get rid of trailing blank line? In-reply-to: References: Comments: In-reply-to "Tena Sakai" message dated "Thu, 02 Apr 2009 14:33:52 -0700" Date: Thu, 02 Apr 2009 19:01:21 -0400 Message-ID: <14638.1238713281@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/23 X-Sequence-Number: 32369 "Tena Sakai" 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