我推出了一个postgres码头集装箱,使用:
docker run -d -e POSTGRES_PASSWORD=x -p 5432:5432
registry.gitlab.com/dalibo/postgresql_anonymizer然后尝试使用以下方法连接它:
set PGPASSWORD=x
psql --host=localhost --port=5432 --user=postgres但是,当我尝试使用Windows cmd上的上述命令连接它时,它会抛出错误:
C:\Program Files\Docker\Docker>psql --host=localhost --port=5432 --user=postgres
psql: illegal option -- user=postgres
Try "psql --help" for more information.提前谢谢你。
发布于 2022-10-18 17:40:15
使用--username=USERNAME选项,如psql --help和手册所述
https://stackoverflow.com/questions/74115089
复制相似问题