Re: psql \d* and system objects - Mailing list pgsql-hackers

From Robert Haas
Subject Re: psql \d* and system objects
Date
Msg-id 603c8f070903281938k7c0a0443rdb6d6c4333638c9d@mail.gmail.com
Whole thread Raw
In response to Re: psql \d* and system objects  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Sat, Mar 28, 2009 at 4:25 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Euler Taveira de Oliveira wrote:
>> Bruce Momjian escreveu:
>> > The psql system object display issue has not been completely resolved
>> > for 8.4;  see 8.4 open items:
>> >
>> >     http://wiki.postgresql.org/wiki/PostgreSQL_8.4_Open_Items#Changes
>> >
>> > So what is the proposal?  Have U/S/A flags for all commands and have
>> > different system display default for each command?
>> >
>> [I don't read the whole thread but...] Why don't we use a DISPLAY_OBJECTS psql
>> variable? The point in providing metacommands is facility. If we're using a
>> psql variable, we don't need to add another character to distinguish between
>> system, user, or both. Also, I don't think people frequently change the search
>> class (system, user, or both) so I don't buy the argument that it is more
>> easier to type another letter each time than typing a '\set FOO bar' once per
>> dozens of commands.
>
> I think the problem is that people often use \dt and then \df or \dT,
> and odds are they would want different system-visible behavior for
> those.  I think we could have a setting that would choose a default of
> 'user-only', or 'all', but I still think we would need the ability to
> override it at command time.

Yeah, I like this.  I think we could even make it a little more
fine-tuned.  For example you might have an option whose values is a
list of object types for which system tables are excluded by default,
with * meaning all.  So you could have:

tsv = exclude system tables, sequences, and views by default
tsvf = exclude system tables, sequences, views, and functions by default
* = don't show any system objects by default
empty string = show all system objects by default

I don't really care about the details, just suggesting it would be
useful to be able to tune by object type.

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: psql \d* and system objects
Next
From: Andrew Chernow
Date:
Subject: Re: PQinitSSL broken in some use casesf