pandas-to-postgres
pandas-to-postgres copied to clipboard
Changes not rolled back when errors
If there is a problem in the COPY stage - for example when there is a mismatch between the table and the DataFrame column names, the code gives an error as expected. But before I can run the same code again, I have to go back and recreate the table in the database because the primary keys were dropped from the table and weren't added back in the errored run. Kindly take a look!