{"action":"closed","issue":{"url":"https://api.github.com/repos/CartoDB/Windshaft/issues/504","repository_url":"https://api.github.com/repos/CartoDB/Windshaft","labels_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/504/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/504/comments","events_url":"https://api.github.com/repos/CartoDB/Windshaft/issues/504/events","html_url":"https://github.com/CartoDB/Windshaft/issues/504","id":188285626,"number":504,"title":"geom_column misreguarded by _postgis_stats call","user":{"login":"strk","id":289678,"avatar_url":"https://avatars.githubusercontent.com/u/289678?v=3","gravatar_id":"","url":"https://api.github.com/users/strk","html_url":"https://github.com/strk","followers_url":"https://api.github.com/users/strk/followers","following_url":"https://api.github.com/users/strk/following{/other_user}","gists_url":"https://api.github.com/users/strk/gists{/gist_id}","starred_url":"https://api.github.com/users/strk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strk/subscriptions","organizations_url":"https://api.github.com/users/strk/orgs","repos_url":"https://api.github.com/users/strk/repos","events_url":"https://api.github.com/users/strk/events{/privacy}","received_events_url":"https://api.github.com/users/strk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-09T16:10:32Z","updated_at":"2016-11-30T12:07:32Z","closed_at":"2016-11-30T12:07:32Z","body":"Given this MapConfig input:\r\n```\r\n{\r\n  \"version\": \"1.5.0\",\r\n  \"layers\": [\r\n    {\r\n      \"type\": \"mapnik\",\r\n      \"options\": {\r\n        \"sql\": \"select * from liberia\",\r\n        \"geom_column\": \"geom\",\r\n        \"cartocss\": \"#s { marker-width: 10; }\",\r\n        \"cartocss_version\": \"2.0.0\",\r\n        \"interactivity\": \"instance\"\r\n      }\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nWindshsaft makes a bogus SQL call:\r\n```\r\n2016-11-09 16:07:20 UTC [190-1] akvo@akvo ERROR:  attribute \"the_geom\" does not exist\r\n2016-11-09 16:07:20 UTC [190-2] akvo@akvo STATEMENT:  SELECT row_to_json(s) as result FROM(select _postgis_stats('public.liberia'::regclass, 'the_geom') as stats) as s\r\n```\r\n\r\nThe hard-coded `the_geom` name is in lib/windshaft/utils/query_utils.js, function \"getTableStats\""}}
{"actor":{"display_login":"rochoa"}}