Adding new csv to postgresql example

I may  have misunderstood what exactly you guys were looking for, but here is a simple example of pulling data from csv into postgresql through the dedupe process. I've pretty much just used the majority of the csv example you guys had and added in an output to postgresql that dynamically creates the table as it would've created the csv output. Using the heading_row I create the columns for the table after comparing it to a pull of reserved keywords (as one of the columns in your data is named 'column,' a reserved name). Any column names that conflict are fixed by appending '_' to the end. 
If this was not what you were asking for, I apologize. I am also planning on cleaning up and adding in my version of your mysql example that uses only postgres tables.