I want to run queries on my postgres databases from scripts and whatnot, without having to do what I do currently:
sudo su - postgres
psql -U USER ...etc
This is cumbersome because I have to type 2 different passwords. Is there a way to configure postgres so that it sees that I'm already logged in as a user that matches a postgres user's name, and log in like that?