mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Handle the whole of PostgreSQL errors.
In a recent test case about camelCasing column names, another kind of error did pop up and there's really no point not to handle it correctly.
This commit is contained in:
parent
ecd4f31d12
commit
0cba5edacd
@ -29,9 +29,7 @@
|
||||
|
||||
;; If PostgreSQL signals a data error, process the batch by isolating
|
||||
;; erroneous data away and retrying the rest.
|
||||
((or
|
||||
CL-POSTGRES-ERROR:INTEGRITY-VIOLATION
|
||||
CL-POSTGRES-ERROR:DATA-EXCEPTION) (condition)
|
||||
(cl-postgres-error::database-error (condition)
|
||||
(retry-batch table-name columns batch batch-rows condition))))
|
||||
|
||||
;;;
|
||||
@ -196,10 +194,7 @@
|
||||
(incf current-batch-pos current-batch-rows))))
|
||||
|
||||
;; the batch didn't make it, prepare error handling for next turn
|
||||
((or
|
||||
CL-POSTGRES-ERROR:INTEGRITY-VIOLATION
|
||||
CL-POSTGRES-ERROR:DATA-EXCEPTION)
|
||||
(next-error-in-batch)
|
||||
(cl-postgres-error::database-error (next-error-in-batch)
|
||||
|
||||
(setf condition next-error-in-batch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user