I have a database with hundreds of tables, what I need to do is export specified tables and insert statements for the data to one sql file.
(我有一个包含数百个表的数据库,我需要做的是导出指定的表,并将数据的插入语句插入一个sql文件。)
The only statement I know can achieve this is
(我知道的唯一可以实现这一目标的语句是)
pg_dump -D -a -t zones_seq interway > /tmp/zones_seq.sql
Should I run this statement for each and every table or is there a way to run a similar statement to export all selected tables into one big sql big.
(我应该为每个表运行此语句,还是有一种方法可以运行类似的语句将所有选定的表导出到一个大sql big中。)
The pg_dump above does not export the table schema only inserts, I need both (上面的pg_dump不会导出仅插入的表模式,我需要两个)
Any help will be appreciated.
(任何帮助将不胜感激。)
ask by Roland translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…