public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jim C. Nasby <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: List schema contents
Date: Fri, 9 Jun 2006 15:27:41 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Fri, Jun 09, 2006 at 04:20:16PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <[email protected]> writes:
> > I'd like to propose that the behavior of \d schemaname. be changed to
> > match
>
> > set search_path = schemaname
> > \d
>
> I'm not sure what your reasoning is here, but AFAICS this would move the
> behavior away from what you say you want. What exactly have you got
> in mind, and why? In particular, why do you think that "\d schemaname."
> doesn't already produce exactly what you asked for, namely a list of the
> tables in that schema? The above would *not* produce such a list
> (counterexample: temp tables).
What I'm looking for is what "\d" provides you, only limited to a
specific schema. "\d information_schema." (for example) doesn't provide
that; it provides the details for every table/view in
information_schema. Changing the search path does what I want, but is a
pain:
decibel=# set search_path=information_schema;
SET
decibel=# \d
List of relations
Schema | Name | Type | Owner
--------------------+---------------------------------+-------+-----------
information_schema | applicable_roles | view | postgres8
information_schema | check_constraints | view | postgres8
information_schema | column_domain_usage | view | postgres8
...
information_schema | usage_privileges | view | postgres8
information_schema | view_column_usage | view | postgres8
information_schema | view_table_usage | view | postgres8
information_schema | views | view | postgres8
(40 rows)
decibel=#
> > One problem I see is that this will break the ability to search for
> > tablename. via regex.
>
> You are aware of the double-quoting option in \d search patterns, no?
No, but I'm not really sure how that would help...
--
Jim C. Nasby, Sr. Engineering Consultant [email protected]
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
view thread (21+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: List schema contents
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox