Prev: Hot Standby 0.2.1
Next: Rejecting weak passwords
From: Alvaro Herrera on 30 Sep 2009 14:02 Andrew Dunstan escribi�: > > > Peter Eisentraut wrote: > >On Wed, 2009-09-30 at 11:03 -0400, Andrew Dunstan wrote: > >>Thinking about this some more, ISTM a much better way of > >>approaching it would be to provide a flag for psql to turn off > >>the fancy formatting, and have pg_regress use that flag. > > > >Well, it might not be a bad idea, but adding a feature just to satisfy > >the test suite instead of fixing the test suite doesn't feel satisfying. > >Is there another use case? > > Sure, as Tom noted pg_regress probably won't be the only user. There > are lots of legacy scripts out there that parse psql output, and it > should be of use to them. All scripts I've seen parsing psql output use unaligned, undecorated mode. I have yet to see one messing with the |'s. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Robert Haas on 30 Sep 2009 14:16 On Wed, Sep 30, 2009 at 1:27 PM, Peter Eisentraut <peter_e(a)gmx.net> wrote: > On Wed, 2009-09-30 at 12:06 -0400, Robert Haas wrote: >> On Wed, Sep 30, 2009 at 11:11 AM, Tom Lane <tgl(a)sss.pgh.pa.us> wrote: >> > Andrew Dunstan <andrew(a)dunslane.net> writes: >> >> Thinking about this some more, ISTM a much better way of approaching it >> >> would be to provide a flag for psql to turn off the fancy formatting, >> >> and have pg_regress use that flag. >> > >> > Yeah, that's not a bad idea. There are likely to be other client >> > programs that won't want this behavioral change either. >> >> I'm surprised there isn't one already. I would think that any new >> format would default to off. > > Well, this isn't a new format, just an enhancement of an existing > format. I disagree. This patch is about replacing ASCII art constructed using | and + and replacing it with box-drawing characters. I think the chances that this will not look good in one or more of the terminal emulators that I use from time to time are excellent, especially if the approach is at all similar to what pstree does on recent versions of Fedora. I'm 100% not interested in tracking down some obscure encoding/locale issue to make it show up right, and I'm 110% not interested in helping the people who file bug reports to track down the analagous issues in their crazy, broken environments. The way it works right now (and has worked for the last 5 years or more) is reliable, familiar, and, at least IME, bullet-proof. I don't even see a good case for changing the default, let alone not providing a way to retreat to the old behavior. Considering that this patch is nothing more than an exceedingly minor piece of window-dressing, taking even a small risk of breaking things for anyone who as of today can log into psql and get work done without pain seems like a bad trade-off to me. ....Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Roger Leigh on 30 Sep 2009 14:21 On Wed, Sep 30, 2009 at 01:30:17PM -0400, Andrew Dunstan wrote: > > > Peter Eisentraut wrote: >> On Wed, 2009-09-30 at 11:03 -0400, Andrew Dunstan wrote: >> >>> Thinking about this some more, ISTM a much better way of approaching >>> it would be to provide a flag for psql to turn off the fancy >>> formatting, and have pg_regress use that flag. >>> >> >> Well, it might not be a bad idea, but adding a feature just to satisfy >> the test suite instead of fixing the test suite doesn't feel satisfying. >> Is there another use case? > > Sure, as Tom noted pg_regress probably won't be the only user. There are > lots of legacy scripts out there that parse psql output, and it should > be of use to them. The attached patch implements this feature. It adds a --no-pretty-formatting/-G option to psql (naming isn't my fort�, so feel free to change it!). This is also documented in the SGML docs, and help text. Lastly, this option is used when invoking psql by pg_regress, which results in a working testsuite in a UTF-8 locale. Hopefully this is OK! I'll be happy to make any amendments required. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
From: Peter Eisentraut on 30 Sep 2009 14:33 On Wed, 2009-09-30 at 14:02 -0400, Alvaro Herrera wrote: > All scripts I've seen parsing psql output use unaligned, undecorated > mode. I have yet to see one messing with the |'s. Plus, we would have broken that with the : continuation lines. -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 30 Sep 2009 15:40
Robert Haas <robertmhaas(a)gmail.com> writes: > The way it works right now (and has worked for the last 5 years or > more) is reliable, familiar, and, at least IME, bullet-proof. I don't > even see a good case for changing the default, let alone not providing > a way to retreat to the old behavior. This is pretty much my opinion as well. I'd vote for requiring a switch to turn it on. Those who really want the new behavior by default can set it up in their .psqlrc. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |