Getting Postgres data into a shell script I use postgres for a lot of different things. Many times, it's a full-blown application where I can directly access the database (i.e. python + psycopg2, java + jdbc, etc...). What if you're using something a bit less formal, like a shell script? psql psql is the native, [...]