Re: Listing databases - Mailing list pgsql-general

From Mark Harrison
Subject Re: Listing databases
Date
Msg-id 409965A7.60507@pixar.com
Whole thread Raw
In response to Listing databases  (Doug Hall <doug_hall@aidt.edu>)
List pgsql-general
Doug Hall wrote:
> Sorry for the newbie question, but how do you get PostgreSQL to list the
> available databases? I know how to log into a certain database, but not
> list all of them. I know this must be possible because the phppgAdmin
> web site demonstrates it with their trial server.
>
> Thanks,
> Doug Hall

Try \? in psql, it will show some really nice commands.  \d will show you the
tables, and "\d tablename" will describe the table.

Try \dS and friends to see the system tables.

One of the best ways to see what is going on under the covers to to
run psql --echo-hidden:

        --echo-hidden
               Echoes the actual queries generated by \d and other
               backslash commands. You can use this if you wish to
               include  similar  functionality  into your own pro­
               grams. This is equivalent to setting  the  variable
               ECHO_HIDDEN from within psql.

Whoever thought to add this to psql is a genius!!!

HTH...
Mark

--
Mark Harrison
Pixar Animation Studios

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Listing databases
Next
From: CSN
Date:
Subject: Re: sql standard: \' or ''