Prev: pgsql: Make CheckRequiredParameterValues() dependupon correct
Next: Should database = all in pg_hba.conf match areplication connection?
From: Steve Atkins on 23 Apr 2010 17:34 On Apr 23, 2010, at 11:28 AM, Tom Lane wrote: > "Ross J. Reedstrom" <reedstrm(a)rice.edu> writes: >> On Fri, Apr 23, 2010 at 10:58:40AM -0500, Terry Brown wrote: >>> So the proposal would be: >>> >>> \d+ does as it has always done, no change >>> \d- (new) always behaves like 'old' \d >>> \d acts as 'old' \d or as \d+, depending on the setting of 'verbose_describe', set via \pset. > >> Hmm, what about all the other + variants? Would this setting affect >> them? I'd suggest perhaps it should. > > If we were to do something like that, it would certainly have to affect > every \d variant that has a + option. Which is probably not a very good > idea --- in many cases that's a very expensive/verbose option. I can't > get excited about this proposal, personally. > > What the OP actually seemed to care about was database object comments. > I could see somebody who relied heavily on comments wanting his comments > to be included in all display commands, even without the + option. > Maybe a configuration variable along the lines of 'always_show_comments' > would be a better design. Or more generally an ability to set aliases via .psqlrc similar to \set, maybe? \alias "\d-" = "\d" \alias "\d" = "\d+" Cheers, Steve -- 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: "Ross J. Reedstrom" on 23 Apr 2010 14:11 On Fri, Apr 23, 2010 at 10:58:40AM -0500, Terry Brown wrote: > I asked on IRC if there was any way to make \d behave like \d+ by default, and davidfetter said no but suggest it here. > > endpoint_david pointed out you could use \d- to get the old behavior if you wanted to temporarily negate the setting. > > So the proposal would be: > > \d+ does as it has always done, no change > \d- (new) always behaves like 'old' \d > \d acts as 'old' \d or as \d+, depending on the setting of 'verbose_describe', set via \pset. > > Default setting of verbose_describe would presumably yield 'old' behavior. > > Motivation is that I like to see comments when they exist. Probably useful for other reasons too. Hmm, what about all the other + variants? Would this setting affect them? I'd suggest perhaps it should. Ross -- Ross Reedstrom, Ph.D. reedstrm(a)rice.edu Systems Engineer & Admin, Research Scientist phone: 713-348-6166 The Connexions Project http://cnx.org fax: 713-348-3665 Rice University MS-375, Houston, TX 77005 GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E F888 D3AE 810E 88F0 BEDE -- 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 23 Apr 2010 14:28 "Ross J. Reedstrom" <reedstrm(a)rice.edu> writes: > On Fri, Apr 23, 2010 at 10:58:40AM -0500, Terry Brown wrote: >> So the proposal would be: >> >> \d+ does as it has always done, no change >> \d- (new) always behaves like 'old' \d >> \d acts as 'old' \d or as \d+, depending on the setting of 'verbose_describe', set via \pset. > Hmm, what about all the other + variants? Would this setting affect > them? I'd suggest perhaps it should. If we were to do something like that, it would certainly have to affect every \d variant that has a + option. Which is probably not a very good idea --- in many cases that's a very expensive/verbose option. I can't get excited about this proposal, personally. What the OP actually seemed to care about was database object comments. I could see somebody who relied heavily on comments wanting his comments to be included in all display commands, even without the + option. Maybe a configuration variable along the lines of 'always_show_comments' would be a better design. BTW, \pset seems like the wrong place for this. That's for formatting table output, not for controlling what specific \d commands show. 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
From: Terry Brown on 24 Apr 2010 10:01 On Fri, 23 Apr 2010 14:28:38 -0400 Tom Lane <tgl(a)sss.pgh.pa.us> wrote: > If we were to do something like that, it would certainly have to affect > every \d variant that has a + option. Which is probably not a very good > idea --- in many cases that's a very expensive/verbose option. I can't > get excited about this proposal, personally. I was thinking of affecting all \d* commands, didn't know some were expensive though. > What the OP actually seemed to care about was database object comments. > I could see somebody who relied heavily on comments wanting his comments > to be included in all display commands, even without the + option. > Maybe a configuration variable along the lines of 'always_show_comments' > would be a better design. Sounds good, comment visibility is my goal. I know full metadata should be handled in other ways, but I like to do most processing in psql sessions for the self documenting effect, and seeing comments helps in that context. If \pset's not the right place anywhere else would be fine. Thanks for considering, Cheers -Terry -- 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: Terry Brown on 24 Apr 2010 10:05
On Fri, 23 Apr 2010 14:34:45 -0700 Steve Atkins <steve(a)blighty.com> wrote: > > Maybe a configuration variable along the lines of 'always_show_comments' > > would be a better design. > > Or more generally an ability to set aliases via .psqlrc similar to \set, maybe? > > \alias "\d-" = "\d" > \alias "\d" = "\d+" Sounds harder but better because of the generality. Cheers -Terry -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |