Skip site navigation (1) Skip section navigation (2)

Re: psql and schemas

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql and schemas
Date: 2004-11-01 06:58:30
Message-ID: 1099292310.17405.118.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sun, 2004-10-31 at 05:32, Tom Lane wrote:
> The behaviors you mention were written at different times by different
> people, and mostly have nothing to do with schemas per se.  I agree that
> some more consistency would probably be good.  Do you have a specific
> proposal?

Sure, I just thought I'd check if there was method to psql's madness
before suggesting changes. Proposed new behavior:

\dn non_existent_schema
===> "No such schema ..."
(previously: empty list of schemas)

\d non_existent_schema.*
===> "No such schema ..."
(previously: Did not find any relation named "non_existent_schema.*".)

I'm not sure how we should handle "\dn schema_name." (notice the period;
assuming a schema with that name exists). The current behavior of
listing all schemas is obviously wrong, but I'm not sure what the right
behavior is. Perhaps we should reject the command?

I think there needs to be a way to list all the objects in a schema.
What do people think about making "\dn schema" behave like "\dn+ schema"
currently does, and changing "\dn+ schema" to list the objects in the
specified schema, like "\d" currently does for the objects in the search

(BTW, I think a useful way to assess the usability of psql's schema
slash commands is trying to use them to explore the information_schema.
Perhaps I'm missing something, but with the current psql it seems almost
impossible to do that effectively without adding information_schema to
the search path.)


In response to


pgsql-hackers by date

Next:From: Fabien COELHODate: 2004-11-01 08:42:57
Subject: Re: Problems using pgxs on Win32
Previous:From: Dennis BjorklundDate: 2004-11-01 06:41:09
Subject: charset/collation in values

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group