diff --git a/src/pgsql/merge-catalogs.lisp b/src/pgsql/merge-catalogs.lisp index f082ef6..9e437e2 100644 --- a/src/pgsql/merge-catalogs.lisp +++ b/src/pgsql/merge-catalogs.lisp @@ -26,7 +26,7 @@ ;; MySQL schema map to PostgreSQL databases, so we might ;; have NIL as a schema name here. Find the current ;; PostgreSQL schema instead of NIL. - (or (schema-name source-schema) + (or (ensure-unquoted (schema-name source-schema)) (pomo:query "select current_schema()" :single))) (target-schema (find-schema target-catalog schema-name))) diff --git a/src/pgsql/pgsql-schema.lisp b/src/pgsql/pgsql-schema.lisp index 1e34f85..8a6f3ad 100644 --- a/src/pgsql/pgsql-schema.lisp +++ b/src/pgsql/pgsql-schema.lisp @@ -71,7 +71,7 @@ (loop :for table :in (append (table-list catalog) (view-list catalog)) :do (let* ((schema-name - (or (schema-name (table-schema table)) + (or (ensure-unquoted (schema-name (table-schema table))) current-schema (setf current-schema (pomo:query "select current_schema()" :single))))