Search Postgresql Archives

Re: Postgres12 - Confusion with pg_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 5 June 2020 19:23, Christophe Pettus <xof@xxxxxxxxxxxx> wrote:

> > On Jun 5, 2020, at 11:20, Laura Smith n5d9xq3ti233xiyif2vp@xxxxxxxxxxxxx wrote:
> > sudo -u postgres pg_restore -v -C -d foobar 4_foobar_pgdump_Fc
>
> You need to connect to a database that already exists (such as "postgres"); it then creates the database you are restoring and switches to it. The relevant manual line is:
>
> "When (-C / --create) is used, the database named with -d is used only to issue the initial DROP DATABASE and CREATE DATABASE commands. All data is restored into the database name that appears in the archive."
>
>

But doesn't the second half of my original post demonstrate that I tried that very thing  ?  I did try creating the database first, but pg_restore just complained even more ?






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux