I know where you are. I am a mysql person as well, and administrating postgres drives me nuts. I am sure it has its merits but I haven't discovered them yet.
You have to change some defaults in the /etc/postgresql/pg_hba file. I donīt exactly recall what they were, but mine look likes this now:
Code:
# Database administrative login by UNIX sockets
local all postgres ident sameuser
#
# All other connections by UNIX sockets
local all all ident sameuser
#
# All IPv4 connections from localhost
host all all 127.0.0.1 255.255.255.255 ident sameuser
#
And my .pgpass file looks like this:
Code:
server.domain.com:5432:*:admin:mypass
I think the secret is in the '*' for the database name.
I am not sure how large a security hole I created with altering the pg_hba. Be sure to plug it back once you are done. Or try to understand what you are doing
Oh, and be extremely careful restoring databases. If you forget to specify which database has to be restored, you are restoring into the template0 database or so. Very disturbing. When you make a database dump (there are 3 or 4 different methods to do so) the database database name is not included by default either.
jlinkels