Re: Need a command to take the backup of the child tables along withits master table.

Поиск
Список
Период
Сортировка
От Ron
Тема Re: Need a command to take the backup of the child tables along withits master table.
Дата
Msg-id 51c5a384-4dc5-fd75-62e6-bcbc518dcfc4@gmail.com
обсуждение исходный текст
Ответ на Need a command to take the backup of the child tables along with itsmaster table.  (Raghavendra Rao J S V <raghavendrajsv@gmail.com>)
Ответы Re: Need a command to take the backup of the child tables along withits master table.  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-general
On 1/24/19 3:40 AM, Raghavendra Rao J S V wrote:
Hi All,

We have one master table and multiple child tables (dependent tables)  associated with it.

 

While taking the backup of the master table , I would like to take the backup of all its child (dependent) tables backup also.

 

Please guide me how to take the backup of the  master table and its dependent tables using pg_dump command.


Do you know the list of dependent tables?  If so, you can list them in the "pg_dump --table=" clause.

If not, you'll have to do some bash magic in parsing the "Foreign-key constraints:" clause of "\d your_table_name" and stuff them in the "pg_dump --table=" clause.


--
Angular momentum makes the world go 'round.

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

Предыдущее
От: Arthur Zakirov
Дата:
Сообщение: Re: Get attributes names
Следующее
От: ramsiddu007
Дата:
Сообщение: Re: Get attributes names