]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Change pg_restore -f- to dump to stdout instead of to ./-
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 4 Nov 2019 18:50:57 +0000 (15:50 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 5 Nov 2019 12:57:35 +0000 (09:57 -0300)
commit9fb25fda6d56524562fb32316335133b6ba0e544
treef88171301eda72fca6c6f67b5141dcdecbe96de2
parentda5cd7a68a3394ad4d22258dee39546615ddff7e
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
doc/src/sgml/ref/pg_restore.sgml
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_restore.c