Re: List all tables from a specific database

Поиск
Список
Период
Сортировка
От Ray O'Donnell
Тема Re: List all tables from a specific database
Дата
Msg-id 424c1084-1e65-8e06-7f80-efe2a2b819e7@rodonnell.ie
обсуждение исходный текст
Ответ на List all tables from a specific database  (Flaviu2 <flaviu2@yahoo.com>)
Ответы Re: List all tables from a specific database  (Thomas Boussekey <thomas.boussekey@gmail.com>)
Re: List all tables from a specific database  (Flaviu2 <flaviu2@yahoo.com>)
Список pgsql-general
On 14/01/2022 10:39, Flaviu2 wrote:
> I work on a project that use Postgre SQL, and I have 0 experience in 
> this regard. I hope to get help here. I need two SQL scripts for Postgre:
> 
> 1. Get all databases, which I aquired already:
> 
> *SELECT datname FROM pg_database WHERE datistemplate = false*
> 
> This one is functional, it's ok.
> 
> 2. Now, I need to find all tables *under a specific* database. This one 
> I don't know how to achieve it. Can you help me here ? It is possible ?

If it's any help, running psql with the -E switch will show you the SQL 
which psql generates... so then (within psql) issuing the \dt command to 
list tables will show you the SQL used.

Ray.


-- 
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie



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

Предыдущее
От: Flaviu2
Дата:
Сообщение: List all tables from a specific database
Следующее
От: Thomas Boussekey
Дата:
Сообщение: Re: List all tables from a specific database