Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: John-Paul Stewart Newsgroups: comp.databases.postgresql Subject: Re: how to disable the '(xx rows)' message Date: Sat, 13 May 2017 15:08:05 -0400 Lines: 24 Message-ID: References: <59174b74$0$794$e4fe514c@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 5Y0nxr/2H4GUdaoRzvLOngfONcMr+verezEN6+s8tmp55+7vwo Cancel-Lock: sha1:XbkhdkCYgubG89unru0iuxP34Pw= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <59174b74$0$794$e4fe514c@news.xs4all.nl> Xref: csiph.com comp.databases.postgresql:769 On 13/05/17 02:07 PM, Luuk wrote: > I have created a script to email some results from a query to meself.. > > Basically something like this: > > ( > echo "To: luuk@inalid.lan" > echo "Subject: TEST" > echo "Content-Type: text/html; charset=us-ascii" > echo > echo "" > psql -H -f test.sql postgresql://user:passwd@here@test > echo "" > ) | /usr/sbin/sendmail -f luuk@invalid.lan > > This works OK, but at the end of the email i always see a line like: > (10 rows) > > Is it possible to remove this line with the help of postgresql? Yes. In psql the \pset meta-command can do all sorts of things. In your specific case, adding '\pset footer off' to the SQL before any queries will omit the undesired line.