List schema contents

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: List schema contents
Date: 2006-06-09 19:33:57
Message-ID: 20060609193356.GC57289@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

Currently, the only way to get a listing of tables in a schema via psql
is to modify your search_path, which is both non-intuitive and a PITA.
You can do \d schemaname., but that's the equivalent of

set search_path = schemaname
\d *

I'd like to propose that the behavior of \d schemaname. be changed to
match

set search_path = schemaname
\d

That avoids issues with table name conflicts that could arise if the
trailing . wasn't required. And the old behavior is still available as
\d schemaname.*

One problem I see is that this will break the ability to search for
tablename. via regex. Since that's easy to do via tablename?, I don't
think it's a big deal, unless someone has better ideas on how to
indicate we want to list something for a specific schema.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-06-09 19:40:53 Re: That EXPLAIN ANALYZE patch still needs work
Previous Message Robert Treat 2006-06-09 19:18:54 Re: Fabian Pascal and RDBMS deficiencies in fully

Browse pgsql-www by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-06-09 19:47:00 Re: List schema contents
Previous Message Marc G. Fournier 2006-06-09 00:10:18 Re: new pgsql-students list needs archive site fixes