Cleanup some pgsql connection handling.

This commit is contained in:
Dimitri Fontaine 2014-09-10 22:20:20 +02:00
parent 422f87e912
commit be9abe48fe

View File

@ -186,7 +186,7 @@
(defun truncate-tables (dbname table-name-list
&key (identifier-case :downcase))
"Truncate given TABLE-NAME in database DBNAME"
(pomo:with-connection (get-connection-spec dbname)
(with-pgsql-transaction (:dbname dbname)
(set-session-gucs *pg-settings*)
(let ((sql (format nil "TRUNCATE ~{~a~^,~};"
(loop :for table-name :in table-name-list