Oct-04-2016, 05:50 PM
(Oct-04-2016, 05:43 PM)klllmmm Wrote: @nilamo Thank you very much, As u point out i should take out conn.commit & cur.close from the for loop.
Also for loop has to be change as :if i >= 0: continueSo now all the lines CSV file printed no error pops up, but it seems nothing is inserted into PostgreSQL data table, as nothing is printed when i run a select command.
Are you sure you want to skip the loop if the index is greater than 0? That means you're skipping every row except the first... which sounds like the opposite of what you want, which would explain why nothing is getting inserted.