pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change pg_restore -f- to dump to stdout instead of to ./-
Date: Tue, 05 Nov 2019 13:11:01 +0000
Message-ID: <E1iRybt-00085i-Od@gemulon.postgresql.org> (raw)

Change pg_restore -f- to dump to stdout instead of to ./-

Starting with PostgreSQL 12, pg_restore refuses to run when neither -d
nor -f are specified (c.f. commit 413ccaa74d9a), and it also makes "-f -"
mean the old implicit behavior of dumping to stdout.  However, older
branches write to a file called ./- when invoked like that, making it
impossible to write pg_restore scripts that work across versions.  This
is a partial backpatch of the aforementioned commit to all older
supported branches, providing an upgrade path.

Discussion: https://postgr.es/m/20191006190839.GE18030@telsasoft.com

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9fb25fda6d56524562fb32316335133b6ba0e544

Modified Files
--------------
doc/src/sgml/ref/pg_restore.sgml     | 4 ++--
src/bin/pg_dump/pg_backup_archiver.c | 7 ++++++-
src/bin/pg_dump/pg_restore.c         | 2 +-
3 files changed, 9 insertions(+), 4 deletions(-)



view thread (5+ messages)  latest in thread

Message-ID: <E1iRybt-00085i-Od@gemulon.postgresql.org>
Permalink:  ../E1iRybt-00085i-Od@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iRybt-00085i-Od@gemulon.postgresql.org

 · 

reply

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-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Change pg_restore -f- to dump to stdout instead of to ./-
  In-Reply-To: <E1iRybt-00085i-Od@gemulon.postgresql.org>
  References: <E1iRybt-00085i-Od@gemulon.postgresql.org>

* 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