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

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Wu Haotian <whtsky(at)gmail(dot)com>
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-07-16 13:09:07
Message-ID: CALDaNm0tNO6v_+W5uBKUmScpUaq9DDFut=OTFvokt=BqTTDWYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 13, 2021 at 9:16 PM Wu Haotian <whtsky(at)gmail(dot)com> wrote:
>
> > 2) I felt pg_dump will include the cascade option for plain format and
> > pg_restore will include the cascade option from pg_restore for other
> > formats. If my understanding is correct, should we document this?
>
> I may not understand it correctly, are you saying
> pg_dump will include the cascade option only for plain format, or
> pg_dump will enable the cascade option for plain by default?

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?

> > 4) Is it possible to add a few tests for this?
>
> Looks like tests should be added to
> `src/bin/pg_dump/t/002_pg_dump.pl`, I'll try to add some.

Yes, that should be the right place.

Regards,
Vignesh

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2021-07-16 13:14:33 Re: [PATCH] Use optimized single-datum tuplesort in ExecSort
Previous Message Aleksander Alekseev 2021-07-16 13:05:44 Re: proposal: enhancing plpgsql debug API - returns text value of variable content