In a tar dump
$ tar -tf dvdrental.tar
toc.dat
2163.dat
...
2189.dat
restore.sql
After extraction
$ file *
2163.dat: ASCII text
...
2189.dat: ASCII text
restore.sql: ASCII text, with very long lines
toc.dat: PostgreSQL custom database dump - v1.12-0
- What is the purpose of
restore.sql? toc.datis binary, but I can open it and it looks like a sql script too. How different are between the purposes ofrestore.sqlandtoc.dat?The following quote from the document does't answer my question:
with one file for each table and blob being dumped, plus a so-called Table of Contents file describing the dumped objects in a machine-readable format that pg_restore can read.
- Since a tar dump contains
restore.sqlbesides the.datfiles, what is the difference between the sql script filesrestore.sqlandtoc.datin a tar dump and a plain dump (which has only one sql script file)?
Thanks.