Re: psql and schemas - Mailing list pgsql-hackers

From Neil Conway
Subject Re: psql and schemas
Date
Msg-id 1099292310.17405.118.camel@localhost.localdomain
Whole thread Raw
In response to Re: psql and schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql and schemas
Re: psql and schemas
List 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
path?

(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.)

-Neil




pgsql-hackers by date:

Previous
From: Dennis Bjorklund
Date:
Subject: charset/collation in values
Next
From: Fabien COELHO
Date:
Subject: Re: Problems using pgxs on Win32