From 2c200f5747e57f3f7938887d80747a114d47ccc6 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 12 Jan 2016 14:53:42 +0100 Subject: [PATCH] Improve error handling for pkeys creation. When creating the primary keys on top of the unique indexes, we might still have errors (e.g. with NULL values). Make it so that a failure in one pkey doesn't fail every other one, by having them all run within a single connection rather than a single transaction. --- src/sources/common/db-methods.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sources/common/db-methods.lisp b/src/sources/common/db-methods.lisp index c95b376..bd8e073 100644 --- a/src/sources/common/db-methods.lisp +++ b/src/sources/common/db-methods.lisp @@ -73,7 +73,7 @@ (when reset-sequences (reset-sequences catalog :pgconn (clone-connection (target-db copy)))) - (with-pgsql-transaction (:pgconn (clone-connection (target-db copy))) + (with-pgsql-connection ((clone-connection (target-db copy))) ;; ;; Turn UNIQUE indexes into PRIMARY KEYS now ;;