| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера