From 2f26b44142b8acf71299dfa94eb4d300fed080c4 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Thu, 11 Feb 2016 16:09:01 +0100 Subject: [PATCH] tDo not quote dbname identifier Turns out that for caching it is our standard not to have the dbname quoted. --- scripts-available/CDB_ForeignTable.sql | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts-available/CDB_ForeignTable.sql b/scripts-available/CDB_ForeignTable.sql index f39e1f8..72333b0 100644 --- a/scripts-available/CDB_ForeignTable.sql +++ b/scripts-available/CDB_ForeignTable.sql @@ -159,10 +159,9 @@ AS $$ ), fqtn AS ( SELECT - quote_ident( - (CASE WHEN c.relkind = 'f' THEN cartodb._cdb_dbname_of_foreign_table(query_tables_oid.reloid) - ELSE current_database() - END)::text) AS dbname, + (CASE WHEN c.relkind = 'f' THEN cartodb._cdb_dbname_of_foreign_table(query_tables_oid.reloid) + ELSE current_database() + END)::text AS dbname, quote_ident(n.nspname::text) schema_name, quote_ident(c.relname::text) table_name, c.relkind,