Update export_sql to support redshift. redshift is based on postgres 8.0.2 that does not support copy from select.