JohnD <lists(at)johndubchak(dot)com> writes:
> I can ssh into the server and do a psql <db-name> from the
> /var/lib/pgsql command prompt, as user postgres. But, when I try to use
> a different user (psql -U user -p <db-name>), from the same prompt, I get:
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.0"?
"-p" doesn't seem like the switch you meant to use here. I think it's
trying to feed the dbname to atoi() and getting a zero for the port
number.
regards, tom lane