patternsqlMinor
Change pg_dump directory output to table name instead of object number
Viewed 0 times
directorypg_dumpnumberoutputinsteadnameobjectchangetable
Problem
pg_dump -F d will result in multiple .dat.gz files which represent the object number in the database.I wish
pg_dump create those files in the format .dat.gz instead so I'll be able to easy distinguish a file/table in a case of table recoery.Solution
There is no built in way to do this. You would have to change the code to do what you want. Or you could script something to rename the files based on the output of
Whatever you come up with wouldn't be very general. For example, what if
pg_restore -l . Whatever you come up with wouldn't be very general. For example, what if
.dat.gz is not a legal file name on your file system?Context
StackExchange Database Administrators Q#213498, answer score: 2
Revisions (0)
No revisions yet.