From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Gustavo FERREYRA <gustavoferreyra@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Drop Database
Date: Thu, 18 Mar 2021 16:05:50 -0700
Message-ID: <fa3c970f-03dc-8593-3677-ec92113a42ce@aklaver.com> (raw)
In-Reply-To: <CAEeWZ7v6AeBVC-=qnuAwu_OOuzfPgTmXnm0Bv754SUKgE-4ayg@mail.gmail.com>
References: <CAEeWZ7v6AeBVC-=qnuAwu_OOuzfPgTmXnm0Bv754SUKgE-4ayg@mail.gmail.com>
On 3/18/21 3:39 PM, Gustavo FERREYRA wrote:
> Hello, a request, which may be resolved in another way and I did not see it.
> When doing a BACKUP plain and using "Include DROP DATABASE statement",
> could you add by default "IF EXISTS" ?
https://www.postgresql.org/docs/12/app-pgdump.html
--if-exists
Use conditional commands (i.e., add an IF EXISTS clause) when
cleaning database objects. This option is not valid unless --clean is
also specified.
> Because when doing a restore, if the database does not exist, it gives
> an error and you have to edit the file to comment out the line.
Which should not be causing an issue.
> Thanks for your work and congratulations, it is a very useful and
> beautiful tool.
> Greetings cordially.
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, gustavoferreyra@gmail.com
Subject: Re: Drop Database
In-Reply-To: <fa3c970f-03dc-8593-3677-ec92113a42ce@aklaver.com>
References: <CAEeWZ7v6AeBVC-=qnuAwu_OOuzfPgTmXnm0Bv754SUKgE-4ayg@mail.gmail.com> <fa3c970f-03dc-8593-3677-ec92113a42ce@aklaver.com>
* 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