PostgreSQL :: コマンドラインから使う場合に便利なオプション (-P format=unaligned -t)

psql -U ユーザ名 DB名  -P format=unaligned -t -c 'SELECT * FROM tablename;'
psql -U ユーザ名 DB名 --tuples-only --pset format=unaligned --field-separator=' ' 
     -c 'SELECT * FROM tablename;'