Re: Add option --drop-cascade for pg_dump/restore

From: Wu Haotian <whtsky(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add option --drop-cascade for pg_dump/restore
Date: 2021-08-12 02:53:36
Message-ID: CADHB_-CqWUk=LPyzOVB6qmTCmX9V6EZeUR7O5tBDP6au_nZWUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I've updated the patch to remove unnecessary changes and added tests.

On Fri, Jul 16, 2021 at 9:09 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> pg_dump support plain, custom, tar and directory format, I think,
> cascade option will be added by pg_dump only for plain format and for
> the other format pg_restore will include the cascade option. Should we
> document this somewhere?

Yes, cascade option relies on `--clean` which only works for plain
format in pg_dump.
Maybe we can add checks like "option --clean requires plain text format"?
If so, should I start a new mail thread for this?

Attachment Content-Type Size
0003-pg_dump-restore-add-drop-cascade-option.patch application/octet-stream 20.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rahila Syed 2021-08-12 03:10:00 Re: Column Filtering in Logical Replication
Previous Message Masahiko Sawada 2021-08-12 02:52:32 Re: Small documentation improvement for ALTER SUBSCRIPTION