Re: Changing databases / schemas

Поиск
Список
Период
Сортировка
От adam_pgsql
Тема Re: Changing databases / schemas
Дата
Msg-id F96A2A19-3522-493B-83EA-B5E0C912B81B@witneyweb.org
обсуждение исходный текст
Ответ на Changing databases / schemas  ("Machiel Richards" <machielr@rdc.co.za>)
Список pgsql-novice
> ·         In MySQL for example you can use “use <database>” and then change between databases which you want to
accesscurrently. 
> o   Is there something similar in Postgres or do you need to disconnect and reconnect to the next database everytime
youwant to change the current working DB? 

To connect to a database from psql:
\c <database>

> ·         Once connected to a database , how can I see a list of schemas and in turn a list of tables that are
currentlyavailable and also how do I see the table info (i.e describe in other dbms systems) 

For a list of schemas (schemata?):
\dn

For a list of tables:
\dt <schema>.*

For a description of the table:
\d <schema>.<tablename>

For a full list of commands use:
\?

cheers

adam


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Machiel Richards"
Дата:
Сообщение: Re: Changing databases / schemas
Следующее
От: Marco Maggi
Дата:
Сообщение: which mailing list for bindings writers