Is there a way to find which file was used to restore a database in pgadmin?

Is there a direct way to find out from which file a restore was done from an sql dump file into a database in pgadmin 4 user interface?

It would be nice to have a postgresql command (like select * from pg_database), but psql would also be fine.

So far I found that in the Comment of Create->Database Menu, the user can complete the dump file name, and then in psql the description can be found with the \l+ command.

  • 2

    No. You can’t store the filename in the dump itself – you can always rename a file. You can’t rely on knowing the filename at restore time – you might not get the dump from a file but from another process via a pipe. The dump might not even be in the form of a single file but rather a directory tree of multiple files.

    – 

Leave a Comment