Re: Drop Database - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Drop Database
Date
Msg-id fa3c970f-03dc-8593-3677-ec92113a42ce@aklaver.com
Whole thread Raw
In response to Drop Database  (Gustavo FERREYRA <gustavoferreyra@gmail.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: basti
Date:
Subject: Re: postgresql order lowercase before uppercase
Next
From: asli cokay
Date:
Subject: Re: WAL-G shipping to the cloud