pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: toraritte@gmail.com
Subject: `pg_restore --if-exists` clarification
Date: Thu, 28 Sep 2023 12:49:26 +0000
Message-ID: <169590536647.3727336.11070254203649648453@wrigleys.postgresql.org> (raw)

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 commands (i.e., add an IF EXISTS clause) 
> to drop database objects. This option is not valid unless 
> --clean is also specified.", but not being a SQL expert, 
> I'm having a hard time deciphering this.

Suggestion: Would you consider adding the sentence (or something similar)?

> "--clean makes pg_restore drop all objects first,
> and --if-exists prevents that non-existent objects
> cause a failure." 
Source: https://stackoverflow.com/a/75136163/1498178

This is succinct, and tells exactly what one needs to know. Thank you and
have a great day!

Appreciatively,
Attila


view thread (8+ messages)  latest in thread

Message-ID: <169590536647.3727336.11070254203649648453@wrigleys.postgresql.org>
Permalink:  ../169590536647.3727336.11070254203649648453@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/169590536647.3727336.11070254203649648453@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, toraritte@gmail.com
  Subject: Re: `pg_restore --if-exists` clarification
  In-Reply-To: <169590536647.3727336.11070254203649648453@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox