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
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
=?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
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
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