Re: [HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-25 Thread Bernd Helmle
--On 23. April 2010 14:34:45 -0700 Steve Atkins wrote: Or more generally an ability to set aliases via .psqlrc similar to \set, maybe? \alias "\d-" = "\d" \alias "\d" = "\d+" You mean something like this? -- Thanks

Re: [HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-24 Thread Terry Brown
On Fri, 23 Apr 2010 14:34:45 -0700 Steve Atkins 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+

Re: [HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-24 Thread Terry Brown
On Fri, 23 Apr 2010 14:28:38 -0400 Tom Lane 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 thi

Re: [HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-23 Thread Steve Atkins
On Apr 23, 2010, at 11:28 AM, Tom Lane wrote: > "Ross J. Reedstrom" 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 \

Re: [HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-23 Thread Tom Lane
"Ross J. Reedstrom" 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',

Re: [HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-23 Thread Ross J. Reedstrom
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

[HACKERS] psql: Add setting to make '+' on \d implicit

2010-04-23 Thread Terry Brown
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