Re: psql omits row count under "\x auto"

From: Noah Misch <noah(at)leadboat(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql omits row count under "\x auto"
Date: 2012-04-27 19:05:41
Message-ID: 20120427190541.GA25553@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 26, 2012 at 09:25:25PM +0300, Peter Eisentraut wrote:
> On m??n, 2012-04-23 at 12:30 -0400, Noah Misch wrote:
> > I've been enjoying "\x auto" in .psqlrc, but I noticed the row count footer
> > missing when it chooses ordinary output:
>
> > Looks like the logic in printQuery() needs further treatment.
>
> Hmm, this looks a bit tricky, because at the time we add the footer we
> don't yet know which output format will be used. I don't have a good
> idea how to fix that at the moment.

I fiddled with this and settled on moving the default_footer boolean setting
and the interpretation thereof down from the printQuery() level to the
printTable() level. That permits delaying the decision until we determine
whether the final output format is indeed vertical.

Attachment Content-Type Size
expanded-auto-rowcount-v1.patch text/plain 11.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-04-27 19:36:15 Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Previous Message Robert Haas 2012-04-27 19:00:07 Re: smart shutdown at end of transaction (was: Default mode for shutdown)