0

I am trying to inspect the contents of an archive that I just unzipped using the following code

pg_restore --list filename

I've aslo tried

pg_restore --list D:/above_file/filename

I'm using PostgreSQL 12

user13456931
  • 25
  • 1
  • 5

1 Answers1

0

Came across the same issue. The answer is that you need to direct the list-file output to a file by specifying the file option as follows:

pg_restore --list --file=".\list-file.txt" backupfilepath

By default the archive list is sent to StdOut as it is designed to be passed into another pg_restore use-list option. See the documentation on the file option copied here for ease of reference:

Specify output file for generated script, or for the listing when used with -l. Use - for stdout.

BossGman
  • 58
  • 5