Thread
-
psql omits row count under "\x auto"
Noah Misch <noah@leadboat.com> — 2012-04-23T16:30:03Z
I've been enjoying "\x auto" in .psqlrc, but I noticed the row count footer missing when it chooses ordinary output: [local] test=# \x off Expanded display is off. [local] test=# select 1; ?column? ---------- 1 (1 row) [local] test=# \x auto Expanded display is used automatically. [local] test=# select 1; ?column? ---------- 1 [local] test=# Looks like the logic in printQuery() needs further treatment. Thanks, nm -
Re: psql omits row count under "\x auto"
Robert Haas <robertmhaas@gmail.com> — 2012-04-25T20:57:36Z
On Mon, Apr 23, 2012 at 12:30 PM, Noah Misch <noah@leadboat.com> wrote: > Looks like the logic in printQuery() needs further treatment. Do you want to propose a patch, or are you hoping someone else is going to address this? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
-
Re: psql omits row count under "\x auto"
Noah Misch <noah@leadboat.com> — 2012-04-26T02:17:33Z
On Wed, Apr 25, 2012 at 04:57:36PM -0400, Robert Haas wrote: > On Mon, Apr 23, 2012 at 12:30 PM, Noah Misch <noah@leadboat.com> wrote: > > Looks like the logic in printQuery() needs further treatment. > > Do you want to propose a patch, or are you hoping someone else is > going to address this? I figured Peter might have a preference for how to fix it. If not, I can put something together.
-
Re: psql omits row count under "\x auto"
Peter Eisentraut <peter_e@gmx.net> — 2012-04-26T18:25:25Z
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.
-
Re: psql omits row count under "\x auto"
Noah Misch <noah@leadboat.com> — 2012-04-27T19:05:41Z
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.
-
Re: psql omits row count under "\x auto"
Robert Haas <robertmhaas@gmail.com> — 2012-05-01T21:26:37Z
On Fri, Apr 27, 2012 at 3:05 PM, Noah Misch <noah@leadboat.com> wrote: > 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. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company