我正在尝试使用 -t 执行特定表的 postgres 转储。但是,该表中有一个大写字母,我收到“未找到匹配的表”。我尝试在表名周围使用引号和双引号,但它们不起作用。我怎样才能让 pg 识别大写字母?谢谢!
pg_dump -h hostname dbname -t tableName > pgdump.sql
最佳答案
这是在普通模式下转储表的完整命令:
pg_dump --host localhost --port 5432 --username "postgres" --role "postgres" --format plain --file "complete_path_file" --table "schema_name.\"table_name\"" "database_name"
或者你可以这样做:
pg_dump -t '"tablename"' database_name > data_base.sql
在这里查看最后一页:Documentation
关于postgresql - Postgres 用大写字母转储特定表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13905162/