Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMKPk-0003c0-Ne for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 22:10:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMKPi-0002kF-IQ for pgsql-general@arkaria.postgresql.org; Mon, 12 Nov 2018 22:10:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMKPi-0002jz-32 for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 22:10:34 +0000 Received: from ook.raf.org ([139.99.156.21]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMKPf-00008U-Jq for pgsql-general@lists.postgresql.org; Mon, 12 Nov 2018 22:10:32 +0000 Received: from localhost (localhost [127.0.0.1]) by ook.raf.org (Postfix) with ESMTP id B8C985E4FE for ; Tue, 13 Nov 2018 09:10:30 +1100 (AEDT) X-Virus-Scanned: Debian amavisd-new at ook.raf.org Received: from ook.raf.org ([127.0.0.1]) by localhost (ook.raf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tKZYXMuuSDbl for ; Tue, 13 Nov 2018 09:10:30 +1100 (AEDT) Received: by ook.raf.org (Postfix, from userid 1001) id 8DFB15E53D; Tue, 13 Nov 2018 09:10:30 +1100 (AEDT) Date: Tue, 13 Nov 2018 09:10:30 +1100 From: raf To: pgsql-general@lists.postgresql.org Subject: Re: Is pg_restore in 10.6 working? Message-ID: <20181112221030.ftnrxugdn37yzdrh@raf.org> References: <28066.1542048297@sss.pgh.pa.us> <20181112220724.mx6y3xrtrwsgrvkb@raf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181112220724.mx6y3xrtrwsgrvkb@raf.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk raf wrote: > Tom Lane wrote: > > > David writes: > > > I have some experience with different versions of Postgres, but I'm just > > > getting around to using pg_restore, and it's not working for me at all. > > > ... > > > But a matching pg_restore command does nothing. > > > pg_restore -U postgres -f predata.sql -v > > > > This command expects to read from stdin and write to predata.sql, so > > it's not surprising that it's just sitting there. What you want > > is something along the lines of > > > > pg_restore -U postgres -d dbname -v > > > regards, tom lane > > Does that mean there's a bug in the usage message? > > pg_restore --help says (admittedly on 9.5 but it's probably the same with 10.6): > > Usage: > pg_restore [OPTION]... [FILE] > > ... > > If no input file name is supplied, then standard input is used. > > To me, that says that a filename on the command line after the options > will be read as the source of the restore. Only if it is absent would > stdin be used. > > Apologies if the usage message for 10.6 doesn't say the same thing. Ah, I didn't notice the -f (output) option. Never mind. cheers, raf