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

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: d38635725cad3fb0a980e02440f5691c9ba00f3f
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2019-11-05T12:57:36Z
Releases: 9.5.20
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

Files

Discussion