Re: pg_dump using SQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump using SQL
Дата
Msg-id 20891.1205895713@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump using SQL  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
Список pgsql-sql
"Phillip Smith" <phillip.smith@weatherbeeta.com.au> writes:
>> Is there any way to do what pg_dump does?, I mean, get the structure of a
>> table in a database (ex: CREATE TABLE ...)

> Turn Query Logging on in postgresql.conf then see what queries are executed
> by pgAdmin or similar when you run it?

But note that these queries are moving targets: they frequently change
from one PG version to the next.

By far the best answer, if you can use it, is to invoke pg_dump itself
as a subprocess.  Something like "pg_dump -s -t mytable ..." for
instance.
        regards, tom lane


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

Предыдущее
От: "Phillip Smith"
Дата:
Сообщение: Re: pg_dump using SQL
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Create on insert a unique random number