Re: [PATCH] minor bug fix for pg_dump --clean

2023-10-27 Thread Bruce Momjian
FYI, this was improved in a recent commit: commit 75af0f401f Author: Tom Lane Date: Fri Sep 29 13:13:54 2023 -0400 Doc: improve description of dump/restore's --clean and --if-exists. Try to make these option descriptions a litt

Re: [PATCH] minor bug fix for pg_dump --clean

2022-10-24 Thread Frédéric Yhuel
On 10/24/22 03:01, Tom Lane wrote: =?UTF-8?Q?Fr=c3=a9d=c3=a9ric_Yhuel?= writes: When using pg_dump (or pg_restore) with option "--clean", there is some SQL code to drop every objects at the beginning. Yup ... The DROP statement for a view involving circular dependencies is : CREATE OR REPLA

Re: [PATCH] minor bug fix for pg_dump --clean

2022-10-23 Thread Tom Lane
=?UTF-8?Q?Fr=c3=a9d=c3=a9ric_Yhuel?= writes: > When using pg_dump (or pg_restore) with option "--clean", there is some > SQL code to drop every objects at the beginning. Yup ... > The DROP statement for a view involving circular dependencies is : > CREATE OR REPLACE VIEW [...] > (see commit mes

Re: [PATCH] minor bug fix for pg_dump --clean

2022-10-23 Thread Виктория Шепард
Hi, Good catch! Here are several points for improvement: 1. pg_dump.c:17380 Maybe better to write simpler appendPQExpBuffer(delcmd, "CREATE SCHEMA IF NOT EXISTS %s;\n", tbinfo->dobj.namespace->dobj.name); because there is a schema name inside the `tbinfo->dobj.namespace->dobj.name ` 2. pg_back

[PATCH] minor bug fix for pg_dump --clean

2022-09-01 Thread Frédéric Yhuel
Hello, When using pg_dump (or pg_restore) with option "--clean", there is some SQL code to drop every objects at the beginning. The DROP statement for a view involving circular dependencies is : CREATE OR REPLACE VIEW [...] (see commit message of d8c05aff for a much better explanation) If t