Re: getting list of tables from command line

Поиск
Список
Период
Сортировка
От Reece Hart
Тема Re: getting list of tables from command line
Дата
Msg-id 1193846688.6897.5.camel@snafu
обсуждение исходный текст
Ответ на getting list of tables from command line  (Craig White <craigwhite@azapple.com>)
Список pgsql-general
On Wed, 2007-10-31 at 08:01 -0700, Craig White wrote:
> I wanted a way to
> query a database and get a text file with just the table names and
> cannot figure out a way to do that.

This should do the trick:

$ psql -Atc "select table_schema||'.'||table_name from
information_schema.tables"

-Reece

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0


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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Join between tables of two or more databases
Следующее
От: Douglas McNaught
Дата:
Сообщение: Re: Securing stored procedures and triggers