1

im trying to export PostgreSQL Databases (db name ari_company) using pg_dump command:

C:\Program Files (x86)\PostgreSQL\10\bin>pg_dump --no-owner -U postgres ari_company> dump.sql

and then i got this error:

pg_dump: [archiver (db)] connection to database "ari_company" failed: FATAL:  database "ari_company" does not exist

but when i run for default database (postgres) it works and dump.sql is created. with command

psql\l
i checked which db exist and there is postgres and my created ari_company. what im doing wrong here ?

2
  • So what exactly does \l show you when you run it in psql? (edit your question) Commented Sep 8, 2018 at 13:35
  • hi, i just found what was the problem. i had two servers instaled but somehow i was connecting to a wrong server (where there was no needed db) Commented Sep 8, 2018 at 13:40

1 Answer 1

1

problem was that i had two installed server but was connecting to wrong server where there is no named database. databse postgres exits on both server because it's created automatically with name like you set for username

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.