onyxfish/csvkit — pull request #300 by shane-axiom (2014-08-02 05:09:24+00:00)
Title: csvsql: don't try to insert data if there are no data rows (fixes #299)

Quick patch to check csv_table row counts before attempting an insert. For some reason a NOT NULL violation was happening with Postgres without this check. Fixes https://github.com/onyxfish/csvkit/issues/299.