From: | M Sarwar <sarwarmd02(at)outlook(dot)com> |
---|---|
To: | Fabrice Chapuis <fabrice636861(at)gmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_restore option --clean |
Date: | 2024-02-21 11:47:29 |
Message-ID: | DM4PR19MB5978387EE25F4EDA640AF391D3572@DM4PR19MB5978.namprd19.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
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(at)gmail(dot)com>
Sent: Wednesday, February 21, 2024 4:17 AM
To: pgsql-admin(at)lists(dot)postgresql(dot)org <pgsql-admin(at)lists(dot)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Fabrice Chapuis | 2024-02-21 14:00:37 | Re: pg_restore option --clean |
Previous Message | Fabrice Chapuis | 2024-02-21 09:17:40 | Fwd: pg_restore option --clean |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2024-02-21 11:48:48 | Re: Synchronizing slots from primary to standby |
Previous Message | Michail Nikolaev | 2024-02-21 11:36:48 | Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements |