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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Change pg_restore -f- to dump to stdout instead of to ./-
Date: 2019-11-05 13:11:01
Message-ID: E1iRybt-00085g-Ny@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d38635725cad3fb0a980e02440f5691c9ba00f3f

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-11-05 13:21:23 Re: pgsql: doc: Further clarify how recovery target parameters are applied
Previous Message Justin Pryzby 2019-11-05 01:35:43 Re: pgsql: Doc: Improve description around ALTER TABLE ATTACH PARTITION