Really beafed up the p.pgsql2csv script.