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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to