What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file? I'm using PostgreSQL 8.4 with pgAdmin III and PSQL plugin where I run queries from. Data consumer Using SQL in Starburst Using SQL in Starburst # Starburst brings Presto’s open source distributed SQL engine for running fast analytic queries against various data sources ranging in size from gigabytes to petabytes to even more data sources, with more robust features.