0
我有我们的数据库的一个小子集作为转储做集成测试。我恢复使用此命令它:Codeship恢复PostgreSQL数据库?
pg_restore --no-acl --no-owner --verbose --create -h localhost -p 5435 -j 4 -U $PG_USER -d test latest.dump
的问题是,在日志中我看到:
pg_restore: connecting to database for restore
pg_restore: processing item 5308 ENCODING ENCODING
pg_restore: processing item 5309 STDSTRINGS STDSTRINGS
pg_restore: processing item 5310 DATABASE dlq8aimf0q2pf
pg_restore: creating DATABASE dlq8aimf0q2pf
pg_restore: connecting to new database "dlq8aimf0q2pf"
pg_restore: connecting to database "dlq8aimf0q2pf" as user "postgres"
正如你可以看到它试图为我指定了打造“dlq8aimf0q2pf”而不是“测试”。 我可以获得数据库名称吗?什么ENV var使用这个名字?