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

Поиск
Список
Период
Сортировка
От vignesh C
Тема Re: Add option --drop-cascade for pg_dump/restore
Дата
Msg-id CALDaNm1o4rhjKv2_jQSz+OW4YRUg6RHLN4cf763kH=6DK+xv7g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add option --drop-cascade for pg_dump/restore  (Haotian Wu <whtsky@gmail.com>)
Ответы Re: Add option --drop-cascade for pg_dump/restore
Список pgsql-hackers
On Fri, Jul 2, 2021 at 12:11 PM Haotian Wu <whtsky@gmail.com> wrote:
>
> Hi,
>
> I agree that —drop-cascade does not make sense for pg_dumpall, so I removed them.
>
> > are we expecting more things to appear after the semi-colon?
>
> No, I was just trying to “reuse” original statement as much as possible. Append “\n” manually should also do the job,
andI’ve updated the patch as you suggests. 

1) This change is not required as it is not supported for pg_dumpall
+++ b/doc/src/sgml/ref/pg_dumpall.sgml
@@ -289,6 +289,16 @@ PostgreSQL documentation
       </listitem>
      </varlistentry>

+     <varlistentry>
+      <term><option>--drop-cascade</option></term>
+      <listitem>
+       <para>
+        Use <literal>CASCADE</literal> to drop database objects.
+        This option is not valid unless <option>--clean</option> is
also specified.
+       </para>
+      </listitem>
+     </varlistentry>
+

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?

3) This change is not required

destroyPQExpBuffer(ftStmt);
                                                        pg_free(dropStmtOrig);
                                                }
+
                                        }

4) Is it possible to add a few tests for this?

Regards,
Vignesh



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

Предыдущее
От: Ronan Dunklau
Дата:
Сообщение: Early Sort/Group resjunk column elimination.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: unnesting multirange data types