From dbf7d6e48f2558b4fd3c3d3abc8c960103d79681 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 10 Jan 2017 21:10:56 +0100 Subject: [PATCH] Don't double-quote identifiers in catalog queries. Avoid double quoting the schema names when used in PostgreSQL catalog queries, where the identifiers are used as literal values and need to be single-quoted. Fix #476, again. --- src/pgsql/pgsql-schema.lisp | 2 +- test/csv-hstore.load | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pgsql/pgsql-schema.lisp b/src/pgsql/pgsql-schema.lisp index 2f2f6f0..3907a37 100644 --- a/src/pgsql/pgsql-schema.lisp +++ b/src/pgsql/pgsql-schema.lisp @@ -88,7 +88,7 @@ "Return an expression suitable to be used as an :including parameter." (let ((schema (or (table-schema table) (query-table-schema table)))) - (list (cons (schema-name schema) + (list (cons (ensure-unquoted (schema-name schema)) (list (format-table-name-as-including-exp table)))))) diff --git a/test/csv-hstore.load b/test/csv-hstore.load index 9f972c8..6d32943 100644 --- a/test/csv-hstore.load +++ b/test/csv-hstore.load @@ -1,6 +1,6 @@ LOAD CSV FROM INLINE - INTO postgresql://dim@localhost/pgloader?"HS" + INTO postgresql://dim@localhost/pgloader?public."HS" WITH truncate, fields terminated by '\t',