0

I have launched a postgres docker container using:

docker run -d -e POSTGRES_PASSWORD=x -p 5432:5432 
registry.gitlab.com/dalibo/postgresql_anonymizer

and then trying to connect it using:

set PGPASSWORD=x
psql --host=localhost --port=5432 --user=postgres

But,when i am trying it to connect it using the above commands on the Windows cmd, it is throwing error:

C:\Program Files\Docker\Docker>psql --host=localhost --port=5432 --user=postgres
psql: illegal option -- user=postgres
Try "psql --help" for more information.

Thank you in advance.

1 Answer 1

1

Use the option --username=USERNAME as described by psql --help and the manual

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

1 Comment

Thanks a lot. It is resolved now. Really appreciated.

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.