Quote identifiers returned by CDB_QueryTables_Updated_At

This commit is contained in:
Rafa de la Torre
2016-02-10 18:58:01 +01:00
parent e870cf96e0
commit 06036e2fe8
2 changed files with 15 additions and 5 deletions

View File

@@ -159,11 +159,12 @@ AS $$
),
fqtn AS (
SELECT
(CASE WHEN c.relkind = 'f' THEN cartodb._cdb_dbname_of_foreign_table(query_tables_oid.reloid)
ELSE current_database()
END)::text AS dbname,
n.nspname::text schema_name,
c.relname::text table_name,
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,
quote_ident(n.nspname::text) schema_name,
quote_ident(c.relname::text) table_name,
c.relkind,
query_tables_oid.reloid
FROM query_tables_oid, pg_catalog.pg_class c