Thread: pgsql: Change pg_restore -f- to dump to stdout instead of to ./-
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/[email protected] Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5ee8f0fe13b42e6a7711496676385a4ce02e9c5a 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(-)