From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Ron <ronljohnsonjr(at)gmail(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: pg_restore a dump in -Fd format? |
Date: | 2018-05-03 17:03:30 |
Message-ID: | CAKFQuwYvnfmHR0DoD9whYA=-XhALE9=88HvX--RHC6OxADtiRQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, May 3, 2018 at 9:36 AM, Ron <ronljohnsonjr(at)gmail(dot)com> wrote:
> Since "pg_dump -Fd" needs a "--file" option to say where to put the dump
> directory, it seemed reasonable that "pg_restore -Fd" would need a --file
> to know where the dump directory is.
>
It is a reasonable assumption - but when it failed the definition for
--file in the pg_restore docs explains that is doesn't work that way.
Its too late to change it now even if its not particularly intuitive. And
the complaint is not directory specific either - though for pg_dump you
don't have the option of redirecting stdout like you do with a file output.
I could see a patch for pg_dump --file option (and maybe pg_restore) covering
this non-symmetry being accepted, should one be put forth, but it doesn't
come up particularly often and it errors out quickly.
On the code front I could see pg_restore being a bit more helpful if it
sees "--file", and stdin is empty, that the resultant error hints to the
user that maybe they mis-used the --file option.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2018-05-03 17:04:49 | Re: pg_restore a dump in -Fd format? |
Previous Message | Don Seiler | 2018-05-03 17:02:10 | Re: pg_restore a dump in -Fd format? |