diff --git a/src/pgsql/pgsql-create-schema.lisp b/src/pgsql/pgsql-create-schema.lisp index c7879bc..9b20cba 100644 --- a/src/pgsql/pgsql-create-schema.lisp +++ b/src/pgsql/pgsql-create-schema.lisp @@ -295,7 +295,8 @@ (section :post) drop-indexes) "Create the indexes that we dropped previously." - (when drop-indexes + (when (and drop-indexes + (< 0 (count-indexes catalog))) (let* ((*preserve-index-names* t) ;; we get the list of indexes from PostgreSQL catalogs, so don't ;; question their spelling, just quote them. diff --git a/test/csv-filename-pattern.load b/test/csv-filename-pattern.load index 65da029..1a15640 100644 --- a/test/csv-filename-pattern.load +++ b/test/csv-filename-pattern.load @@ -7,8 +7,10 @@ load csv with fields optionally enclosed by '"', fields terminated by ',', truncate, - workers = 8, - concurrency = 1 + disable triggers, + drop indexes + -- workers = 8, + -- concurrency = 1 before load do $$ drop table if exists matching; $$,