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

From: Steve Atkins <steve(at)blighty(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: Add setting to make '+' on \d implicit
Date: 2010-04-23 21:34:45
Message-ID: 5E92CC17-71CE-45E9-955A-4DC60257CDC4@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Apr 23, 2010, at 11:28 AM, Tom Lane wrote:

> "Ross J. Reedstrom" <reedstrm(at)rice(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-04-23 21:38:01 Re: recovery_connections cannot start (was Re: master in standby mode croaks)
Previous Message Simon Riggs 2010-04-23 21:32:13 Re: [HACKERS] Re: pgsql: Make CheckRequiredParameterValues() depend upon correct