Re: Listing databases

Поиск
Список
Период
Сортировка
От Mark Harrison
Тема Re: Listing databases
Дата
Msg-id 409965A7.60507@pixar.com
обсуждение исходный текст
Ответ на Listing databases  (Doug Hall <doug_hall@aidt.edu>)
Список 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 по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Listing databases
Следующее
От: CSN
Дата:
Сообщение: Re: sql standard: \' or ''