Ian Barwick <ian.barwick@xxxxxxxxxxxxxxx> writes: > On 7/10/19 2:56 AM, Alex Williams wrote: >> 3. Restore the database with this command: >> zcat /var/backup/db/mydatabase.gz | sudo -H -u postgres psql --quiet -e -c 'SET default_tablespace = pg_default;' -f - mydatabase_test > /tmp/mydatabase_test.log > This should work. Yeah, on modern PG. But I think psql didn't support combinations of -c and -f switches until 9.6. 9.5 would simply have dropped that -c switch. regards, tom lane