How can I (programmatically) find out which database a dump was taken from given the dump file ?
Constraints of the question:
- existing dump in directory format - dump was taken of only one particular database
I know of no documentation on the format of the toc.dat file contained in that directory format pg_dump output (short of reading the source to pg_dump/restore?) but I tried a hexdump...