{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments/32928571","id":32928571,"diff_hunk":"@@ -203,6 +204,24 @@ console.log('ogr2ogr ' + _.map(ogrargs, function(x) { return \"'\" + x + \"'\"; }).j\n       callback(err, out_filename);\n     }\n   );\n+  function checkPGReserved(sql) {","path":"app/models/formats/ogr.js","position":14,"original_position":14,"commit_id":"67a6d194b74249766f2d6ee1b38878f2be9e4129","original_commit_id":"67a6d194b74249766f2d6ee1b38878f2be9e4129","user":{"login":"pramsey","id":113883,"avatar_url":"https://avatars.githubusercontent.com/u/113883?v=3","gravatar_id":"","url":"https://api.github.com/users/pramsey","html_url":"https://github.com/pramsey","followers_url":"https://api.github.com/users/pramsey/followers","following_url":"https://api.github.com/users/pramsey/following{/other_user}","gists_url":"https://api.github.com/users/pramsey/gists{/gist_id}","starred_url":"https://api.github.com/users/pramsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pramsey/subscriptions","organizations_url":"https://api.github.com/users/pramsey/orgs","repos_url":"https://api.github.com/users/pramsey/repos","events_url":"https://api.github.com/users/pramsey/events{/privacy}","received_events_url":"https://api.github.com/users/pramsey/received_events","type":"User","site_admin":false},"body":"Might want to note in comment the purpose for this transformation? OGR will treat any column with the special names as if it is a geometry column. https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrsf_frmts/pg/ogrpglayer.cpp#L1387","created_at":"2015-06-22T12:28:15Z","updated_at":"2015-06-22T12:28:15Z","html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/234#discussion_r32928571","pull_request_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments/32928571"},"html":{"href":"https://github.com/CartoDB/CartoDB-SQL-API/pull/234#discussion_r32928571"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234","id":38217568,"html_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/234","diff_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/234.diff","patch_url":"https://github.com/CartoDB/CartoDB-SQL-API/pull/234.patch","issue_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/234","number":234,"state":"open","locked":false,"title":"Prefixes OGR reserved fields with an underscore to prevent blank csv files","user":{"login":"fdansv","id":3707222,"avatar_url":"https://avatars.githubusercontent.com/u/3707222?v=3","gravatar_id":"","url":"https://api.github.com/users/fdansv","html_url":"https://github.com/fdansv","followers_url":"https://api.github.com/users/fdansv/followers","following_url":"https://api.github.com/users/fdansv/following{/other_user}","gists_url":"https://api.github.com/users/fdansv/gists{/gist_id}","starred_url":"https://api.github.com/users/fdansv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdansv/subscriptions","organizations_url":"https://api.github.com/users/fdansv/orgs","repos_url":"https://api.github.com/users/fdansv/repos","events_url":"https://api.github.com/users/fdansv/events{/privacy}","received_events_url":"https://api.github.com/users/fdansv/received_events","type":"User","site_admin":false},"body":"@rochoa \r\n\r\nI'm not super confident about this code. Tests pass, and I've added an additional one, but I'm not familiar enough with the SQL syntax/spec to be certain that this covers all cases.\r\n\r\nFixes #184 \r\n\r\ncc. @pramsey ","created_at":"2015-06-22T10:23:16Z","updated_at":"2015-06-22T12:28:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"63fa8c055ef189ee71ab6650fd9f6f59bcefda43","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234/commits","review_comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234/comments","review_comment_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/234/comments","statuses_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/67a6d194b74249766f2d6ee1b38878f2be9e4129","head":{"label":"CartoDB:defaultalias","ref":"defaultalias","sha":"67a6d194b74249766f2d6ee1b38878f2be9e4129","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":1994634,"name":"CartoDB-SQL-API","full_name":"CartoDB/CartoDB-SQL-API","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/CartoDB-SQL-API","description":"CartoDB SQL API","fork":false,"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API","forks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/forks","keys_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/teams","hooks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/events","assignees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/tags","blobs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/languages","stargazers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscription","commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/merges","archive_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/downloads","issues_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/releases{/id}","created_at":"2011-07-04T09:35:13Z","updated_at":"2015-04-13T01:38:41Z","pushed_at":"2015-06-22T10:23:17Z","git_url":"git://github.com/CartoDB/CartoDB-SQL-API.git","ssh_url":"git@github.com:CartoDB/CartoDB-SQL-API.git","clone_url":"https://github.com/CartoDB/CartoDB-SQL-API.git","svn_url":"https://github.com/CartoDB/CartoDB-SQL-API","homepage":"","size":4376,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":40,"forks":29,"open_issues":40,"watchers":25,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"283572c53579699882724cfb74b1ae295b3285a0","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":1994634,"name":"CartoDB-SQL-API","full_name":"CartoDB/CartoDB-SQL-API","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/CartoDB-SQL-API","description":"CartoDB SQL API","fork":false,"url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API","forks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/forks","keys_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/teams","hooks_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/events","assignees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/tags","blobs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/languages","stargazers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/subscription","commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/merges","archive_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/downloads","issues_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/releases{/id}","created_at":"2011-07-04T09:35:13Z","updated_at":"2015-04-13T01:38:41Z","pushed_at":"2015-06-22T10:23:17Z","git_url":"git://github.com/CartoDB/CartoDB-SQL-API.git","ssh_url":"git@github.com:CartoDB/CartoDB-SQL-API.git","clone_url":"https://github.com/CartoDB/CartoDB-SQL-API.git","svn_url":"https://github.com/CartoDB/CartoDB-SQL-API","homepage":"","size":4376,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":40,"forks":29,"open_issues":40,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234"},"html":{"href":"https://github.com/CartoDB/CartoDB-SQL-API/pull/234"},"issue":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/234"},"comments":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/CartoDB-SQL-API/statuses/67a6d194b74249766f2d6ee1b38878f2be9e4129"}}}}