The question seems to imply that pg_restore
is executing these SQL commands and you wouldn't want to see them in the output. But outputting them is what it's only supposed to do.
pg_restore
has two modes of operation, with or without connecting to a database. When it's called without a database (-d
option) as shown in the question:
$ pg_restore --cluster 8.4/mycluster mycluster.dump
then its sole purpose is to output a set of SQL commands in plain text that should be fed to an SQL interpreter to restore the database. Those SQL commands form a coherent set without any concept of verbosity, and they are not executed by pg_restore
itself. They're generally redirected into a file for later execution or piped into psql
for immediate execution.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…