Re: `pg_restore --if-exists` clarification

2023-09-29 Thread Gulyás Attila
Thank you so much! Appreciatively, Attila On Fri, Sep 29, 2023 at 1:15 PM Tom Lane wrote: > =?UTF-8?Q?Guly=C3=A1s_Attila?= writes: > > I would love to see Tom's version in the docs! It is only slightly longer > > than the current one, but absolutely clear of the purpose of both, and > the > >

Re: `pg_restore --if-exists` clarification

2023-09-29 Thread Tom Lane
=?UTF-8?Q?Guly=C3=A1s_Attila?= writes: > I would love to see Tom's version in the docs! It is only slightly longer > than the current one, but absolutely clear of the purpose of both, and the > behaviour when used in tandem. Hearing no objections, done at https://git.postgresql.org/gitweb/?p=pos

Re: `pg_restore --if-exists` clarification

2023-09-29 Thread Gulyás Attila
I would love to see Tom's version in the docs! It is only slightly longer than the current one, but absolutely clear of the purpose of both, and the behaviour when used in tandem. Appreciatively, Attila On Thu, Sep 28, 2023 at 1:03 PM Tom Lane wrote: > "David G. Johnston" writes: > >>> .. But

Re: `pg_restore --if-exists` clarification

2023-09-28 Thread Tom Lane
"David G. Johnston" writes: >>> .. But pragmatically it doesn't matter, so why not >>> reclassify this as a "warning" or a "notice"? > Because pg_restore is just a client and it is repeating back what the > server tells it. And for the server it is an error to drop an object that > doesn’t exist

Re: `pg_restore --if-exists` clarification

2023-09-28 Thread David G. Johnston
On Thursday, September 28, 2023, Gulyás Attila wrote: > So `--if-exists` simply suppresses any notice / warning that would occur? > That switch causes the drop DDL produced by pg_restore to include if exists clauses. The server then simply treats the DDL as a no-op if said object being dropped

Re: `pg_restore --if-exists` clarification

2023-09-28 Thread Gulyás Attila
So `--if-exists` simply suppresses any notice / warning that would occur? I'm sorry if I come off as obtuse, but I have literally no idea what `--clean` and `--if-exists` do when used together. I took the quote from the Stackoverflow answer on face value, because it sounded plausible and I can't u

Re: `pg_restore --if-exists` clarification

2023-09-28 Thread Kirk Parker
On Thu, Sep 28, 2023, 05:52 PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/16/app-pgrestore.html > Description: > > Good Morning, > > In the `pg_restore` docs > (https://www.postgresql.org/docs/current/ap

`pg_restore --if-exists` clarification

2023-09-28 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/app-pgrestore.html Description: Good Morning, In the `pg_restore` docs (https://www.postgresql.org/docs/current/app-pgrestore.html), `--if-exists` states that it is to > Use conditional