Re: pg_restore option --clean
От | M Sarwar |
---|---|
Тема | Re: pg_restore option --clean |
Дата | |
Msg-id | DM4PR19MB5978387EE25F4EDA640AF391D3572@DM4PR19MB5978.namprd19.prod.outlook.com обсуждение исходный текст |
Ответ на | Fwd: pg_restore option --clean (Fabrice Chapuis <fabrice636861@gmail.com>) |
Ответы |
Re: pg_restore option --clean
|
Список | pgsql-admin |
Look around for
ALTER TABLE TABLE-NAME
ADD constraint fk-name foreign key col-name refers to tab-name ( col-name )
on UPDATE cascase
on DELETE CASCADE
;
Good luck,
Sarwar
From: Fabrice Chapuis <fabrice636861@gmail.com>
Sent: Wednesday, February 21, 2024 4:17 AM
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Fwd: pg_restore option --clean
Sent: Wednesday, February 21, 2024 4:17 AM
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Fwd: pg_restore option --clean
Hi,
The --clean option of pg_restore allows you to replace an object before being imported. However, dependencies such as foreign keys or views prevent the deletion of the object. Is there a way to add the cascade option to force the deletion?
Thanks for helping
Fabrice
В списке pgsql-admin по дате отправления: