Michael Long <mlong@datalong.com> writes:
> I had just discovered that I need to specify the port when creating a
> database. I had thought that I had read in the documentation that if I
> built the server from source and specified the port to use that the
> client would be bound to that by default.
The client *that you built along with the server* will bind to that port
by default. It's not going to somehow magically propagate to other
clients built with other default port numbers.
The default port number on the client side is actually built into libpq,
not psql. So one possible explanation if you think you've covered the
obvious bases is that you're invoking the correct version-specific psql
programs, but they are all binding to the same libpq.so. Check
LD_LIBRARY_PATH, ldconfig configuration, etc.
regards, tom lane