From 83ac8f450275d6040a22aff9a6a80e5ade50c4d8 Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Fri, 20 Nov 2015 13:05:15 +0100 Subject: [PATCH] Fix: Allow dots in column names to be cartodbfied This fixes #6144 of cartodb Note that prior commit ea9503bd32ddb8d78bcf4e8fa0ed2da02cb022b1 only added the tests for this, but not the actual fix (oops) --- scripts-available/CDB_CartodbfyTable.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts-available/CDB_CartodbfyTable.sql b/scripts-available/CDB_CartodbfyTable.sql index 687802a..ceee0cc 100644 --- a/scripts-available/CDB_CartodbfyTable.sql +++ b/scripts-available/CDB_CartodbfyTable.sql @@ -1068,8 +1068,8 @@ BEGIN -- Add now add all the rest of the columns -- by selecting their names into an array and -- joining the array with a comma - SELECT - ',' || array_to_string(array_agg(a.attname),',') AS column_name_sql, + SELECT + ',' || array_to_string(array_agg(Format('%I',a.attname)),',') AS column_name_sql, Count(*) AS count INTO rec FROM pg_class c