I have access to two postgres database servers on different hosts. On server A I access the client using:
psql -h localhost -U user -W db_name
db_name=>
And on the second host B I access the client using (docker image):
docker run -it --rm --network fiware_default jbergknoff/postgresql-client\
postgresql://postgres:password@postgres-db:5432/postgres
postgres=#
Now I need to dump database file copied from A (now on B) using:
psql -U postgres -d targetdb -f sourcedb.sql
However, the command psql
isn´t recognised second host B. I mean I cannot run commands using psql
B
what is then the difference between psql
and postgres-client
here please?