I have a small subset of our db as a dump to do integration testing. I restore it using this command:
pg_restore --no-acl --no-owner --verbose --create -h localhost -p 5435 -j 4 -U $PG_USER -d test latest.dump
The problem is that in the logs I see:
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"
As you could see it tries to create "dlq8aimf0q2pf" not "test" as I specified. Would I be able to get the database name? What ENV var is using this name?