Psycopg 3 throws a generic ProgramimgError, so core.py has trouble
reporting the problem. Perhaps this can be solved by creating a
generic PreparedStmt class at the core level, but this works for
the moment.
from pgwui_upload_core.views.upload import (
BaseTableUploadHandler,
UploadCoreInitialPost,
+ match_insert_to_dataline,
set_upload_response,
)
filepath = data.filepath
try:
udl = thunk()
- self.param_execute(self.insert_map[filepath], udl)
+ insert_stmt = self.insert_map[filepath]
+ match_insert_to_dataline(udl, insert_stmt, source_file=filepath)
+ self.param_execute(insert_stmt.stmt, udl)
except (core_ex.DataLineError, core_ex.DBError) as exp:
relation = data.relation
raise exp.color(map_description(filepath, relation),