title: Save PL/pgSQL output from PostgreSQL to a CSV file
body: <p>What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file? </p>
  
  <p>I'm using PostgreSQL 8.4 with pgAdmin III and PSQL plugin where I run queries from.</p>