Re: I have an exporting need...

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: I have an exporting need...
Дата
Msg-id CAApHDvoESC9CeFEY6ycRrJQsNBK8sqzPLA6mCY+XN=o=FCDjEg@mail.gmail.com
обсуждение исходный текст
Ответ на I have an exporting need...  (Juan Hernández <dejesusog@gmail.com>)
Список pgsql-hackers
On Tue, 14 May 2024 at 06:18, Juan Hernández <dejesusog@gmail.com> wrote:
> Do you consider useful to add a parameter (for example, --separatetables) so when used the exporting file process can
createa different tablename.sql file for each table in database automatically? 
>
> Example...
>
> PGHOST="/tmp" PGPASSWORD="mydbpass" pg_dump -U dbusername --separatetables -Fp --inserts dbname > "/route/dbname.sql"
>
> And if this database has tables table1...table10, then 10 files are created...

pg_dump has code to figure out the dependency of objects in the
database so that the dump file produced can be restored.  If one file
was output per table, how would you know in which order to restore
them? For example, you have a table with a FOREIGN KEY to reference
some other table, you need to restore the referenced table first.
That's true for both restoring the schema and restoring the data.

David



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

Предыдущее
От: "Yusuke Egashira (Fujitsu)"
Дата:
Сообщение: RE: Resetting synchronous_standby_names can wait for CHECKPOINT to finish
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: GUC-ify walsender MAX_SEND_SIZE constant