{"action":"created","comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments/91929021","pull_request_review_id":12437092,"id":91929021,"diff_hunk":"@@ -761,6 +769,54 @@ transformFormatType(char *formatname)\n \treturn result;\n }\n \n+/*\n+ * Transform the FORMAT options into a text field. Parse the\n+ */\n+static Datum\n+transformExtOpts(List *extOptions)\n+{\n+    ListCell   *option;\n+    Datum       result;\n+    char       *optionStr = NULL;\n+\n+\t/* options buffer */\n+\tStringInfoData extOptsbuf;\n+\tinitStringInfo(&extOptsbuf);\n+\n+\tforeach(option, extOptions)\n+\t{\n+\t\tDefElem    *defel = (DefElem *) lfirst(option);\n+\t\tchar       *key = defel->defname;\n+\t\tchar       *val = defGetString(defel);\n+\n+\t\t/*\n+\t\t * Output \"<key> '<val>' \", but replace any space chars in the key\n+\t\t * with meta char (MPP-14467)\n+\t\t */\n+\t\twhile (*key)\n+\t\t{\n+\t\t    if (*key == ' ')\n+\t\t        appendStringInfoString(&extOptsbuf, \"<gpx20>\");","path":"src/backend/commands/exttablecmds.c","position":67,"original_position":67,"commit_id":"b8c4814756dff63cd19e8bee063d5a88b4633246","original_commit_id":"b8c4814756dff63cd19e8bee063d5a88b4633246","user":{"login":"hlinnaka","id":191602,"avatar_url":"https://avatars.githubusercontent.com/u/191602?v=3","gravatar_id":"","url":"https://api.github.com/users/hlinnaka","html_url":"https://github.com/hlinnaka","followers_url":"https://api.github.com/users/hlinnaka/followers","following_url":"https://api.github.com/users/hlinnaka/following{/other_user}","gists_url":"https://api.github.com/users/hlinnaka/gists{/gist_id}","starred_url":"https://api.github.com/users/hlinnaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlinnaka/subscriptions","organizations_url":"https://api.github.com/users/hlinnaka/orgs","repos_url":"https://api.github.com/users/hlinnaka/repos","events_url":"https://api.github.com/users/hlinnaka/events{/privacy}","received_events_url":"https://api.github.com/users/hlinnaka/received_events","type":"User","site_admin":false},"body":"What on earth is this?","created_at":"2016-12-12T11:27:08Z","updated_at":"2016-12-12T11:43:31Z","html_url":"https://github.com/greenplum-db/gpdb/pull/1436#discussion_r91929021","pull_request_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436","_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments/91929021"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/1436#discussion_r91929021"},"pull_request":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436"}}},"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436","id":97533627,"html_url":"https://github.com/greenplum-db/gpdb/pull/1436","diff_url":"https://github.com/greenplum-db/gpdb/pull/1436.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/1436.patch","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1436","number":1436,"state":"open","locked":false,"title":"Support 'OPTION' keyword in GPDB external table","user":{"login":"kuien","id":14087289,"avatar_url":"https://avatars.githubusercontent.com/u/14087289?v=3","gravatar_id":"","url":"https://api.github.com/users/kuien","html_url":"https://github.com/kuien","followers_url":"https://api.github.com/users/kuien/followers","following_url":"https://api.github.com/users/kuien/following{/other_user}","gists_url":"https://api.github.com/users/kuien/gists{/gist_id}","starred_url":"https://api.github.com/users/kuien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuien/subscriptions","organizations_url":"https://api.github.com/users/kuien/orgs","repos_url":"https://api.github.com/users/kuien/repos","events_url":"https://api.github.com/users/kuien/events{/privacy}","received_events_url":"https://api.github.com/users/kuien/received_events","type":"User","site_admin":false},"body":"In case user wanna specify parameters with OPTION other than config\r\nfile in LOCATION, it provides flexible and friendly grammar.\r\n\r\nUsage:\r\n    CREATE EXTERNAL TABLE xxx LOCATION xxx FORMAT xxx\r\n    [OPTION ( [option_key [AS] 'option_value' [, ...]] )]\r\n    xxx;\r\n\r\nAs it adds a column 'options' in catalog table 'pg_exttable', we need\r\nto update the catalogversion as well.\r\n\r\nNOTE: in this commit we don't implement related parts towards pg_dump\r\n    and alter operations yet. ","created_at":"2016-12-12T11:09:05Z","updated_at":"2016-12-12T11:43:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05500419204abf3eaa8c55c90c6a99a48bded6d0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436/commits","review_comments_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436/comments","review_comment_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/1436/comments","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/b8c4814756dff63cd19e8bee063d5a88b4633246","head":{"label":"kuien:cloud_option_pr","ref":"cloud_option_pr","sha":"b8c4814756dff63cd19e8bee063d5a88b4633246","user":{"login":"kuien","id":14087289,"avatar_url":"https://avatars.githubusercontent.com/u/14087289?v=3","gravatar_id":"","url":"https://api.github.com/users/kuien","html_url":"https://github.com/kuien","followers_url":"https://api.github.com/users/kuien/followers","following_url":"https://api.github.com/users/kuien/following{/other_user}","gists_url":"https://api.github.com/users/kuien/gists{/gist_id}","starred_url":"https://api.github.com/users/kuien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuien/subscriptions","organizations_url":"https://api.github.com/users/kuien/orgs","repos_url":"https://api.github.com/users/kuien/repos","events_url":"https://api.github.com/users/kuien/events{/privacy}","received_events_url":"https://api.github.com/users/kuien/received_events","type":"User","site_admin":false},"repo":{"id":45446447,"name":"gpdb","full_name":"kuien/gpdb","owner":{"login":"kuien","id":14087289,"avatar_url":"https://avatars.githubusercontent.com/u/14087289?v=3","gravatar_id":"","url":"https://api.github.com/users/kuien","html_url":"https://github.com/kuien","followers_url":"https://api.github.com/users/kuien/followers","following_url":"https://api.github.com/users/kuien/following{/other_user}","gists_url":"https://api.github.com/users/kuien/gists{/gist_id}","starred_url":"https://api.github.com/users/kuien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuien/subscriptions","organizations_url":"https://api.github.com/users/kuien/orgs","repos_url":"https://api.github.com/users/kuien/repos","events_url":"https://api.github.com/users/kuien/events{/privacy}","received_events_url":"https://api.github.com/users/kuien/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kuien/gpdb","description":"Pivotal Greenplum Database","fork":true,"url":"https://api.github.com/repos/kuien/gpdb","forks_url":"https://api.github.com/repos/kuien/gpdb/forks","keys_url":"https://api.github.com/repos/kuien/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kuien/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kuien/gpdb/teams","hooks_url":"https://api.github.com/repos/kuien/gpdb/hooks","issue_events_url":"https://api.github.com/repos/kuien/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/kuien/gpdb/events","assignees_url":"https://api.github.com/repos/kuien/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/kuien/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/kuien/gpdb/tags","blobs_url":"https://api.github.com/repos/kuien/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kuien/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kuien/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/kuien/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kuien/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/kuien/gpdb/languages","stargazers_url":"https://api.github.com/repos/kuien/gpdb/stargazers","contributors_url":"https://api.github.com/repos/kuien/gpdb/contributors","subscribers_url":"https://api.github.com/repos/kuien/gpdb/subscribers","subscription_url":"https://api.github.com/repos/kuien/gpdb/subscription","commits_url":"https://api.github.com/repos/kuien/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/kuien/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/kuien/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/kuien/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/kuien/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/kuien/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kuien/gpdb/merges","archive_url":"https://api.github.com/repos/kuien/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kuien/gpdb/downloads","issues_url":"https://api.github.com/repos/kuien/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/kuien/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/kuien/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/kuien/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kuien/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/kuien/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/kuien/gpdb/deployments","created_at":"2015-11-03T06:28:30Z","updated_at":"2015-11-03T06:29:15Z","pushed_at":"2016-12-12T11:05:25Z","git_url":"git://github.com/kuien/gpdb.git","ssh_url":"git@github.com:kuien/gpdb.git","clone_url":"https://github.com/kuien/gpdb.git","svn_url":"https://github.com/kuien/gpdb","homepage":"http://greenplum.org","size":181032,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"greenplum-db:master","ref":"master","sha":"38efcba47b718244d6d7a91379fc4f94c5be2d10","user":{"login":"greenplum-db","id":14097842,"avatar_url":"https://avatars.githubusercontent.com/u/14097842?v=3","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"repo":{"id":44781140,"name":"gpdb","full_name":"greenplum-db/gpdb","owner":{"login":"greenplum-db","id":14097842,"avatar_url":"https://avatars.githubusercontent.com/u/14097842?v=3","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/greenplum-db/gpdb","description":"Greenplum Database","fork":false,"url":"https://api.github.com/repos/greenplum-db/gpdb","forks_url":"https://api.github.com/repos/greenplum-db/gpdb/forks","keys_url":"https://api.github.com/repos/greenplum-db/gpdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenplum-db/gpdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenplum-db/gpdb/teams","hooks_url":"https://api.github.com/repos/greenplum-db/gpdb/hooks","issue_events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/events{/number}","events_url":"https://api.github.com/repos/greenplum-db/gpdb/events","assignees_url":"https://api.github.com/repos/greenplum-db/gpdb/assignees{/user}","branches_url":"https://api.github.com/repos/greenplum-db/gpdb/branches{/branch}","tags_url":"https://api.github.com/repos/greenplum-db/gpdb/tags","blobs_url":"https://api.github.com/repos/greenplum-db/gpdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenplum-db/gpdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenplum-db/gpdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenplum-db/gpdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenplum-db/gpdb/statuses/{sha}","languages_url":"https://api.github.com/repos/greenplum-db/gpdb/languages","stargazers_url":"https://api.github.com/repos/greenplum-db/gpdb/stargazers","contributors_url":"https://api.github.com/repos/greenplum-db/gpdb/contributors","subscribers_url":"https://api.github.com/repos/greenplum-db/gpdb/subscribers","subscription_url":"https://api.github.com/repos/greenplum-db/gpdb/subscription","commits_url":"https://api.github.com/repos/greenplum-db/gpdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenplum-db/gpdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenplum-db/gpdb/contents/{+path}","compare_url":"https://api.github.com/repos/greenplum-db/gpdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenplum-db/gpdb/merges","archive_url":"https://api.github.com/repos/greenplum-db/gpdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenplum-db/gpdb/downloads","issues_url":"https://api.github.com/repos/greenplum-db/gpdb/issues{/number}","pulls_url":"https://api.github.com/repos/greenplum-db/gpdb/pulls{/number}","milestones_url":"https://api.github.com/repos/greenplum-db/gpdb/milestones{/number}","notifications_url":"https://api.github.com/repos/greenplum-db/gpdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/labels{/name}","releases_url":"https://api.github.com/repos/greenplum-db/gpdb/releases{/id}","deployments_url":"https://api.github.com/repos/greenplum-db/gpdb/deployments","created_at":"2015-10-23T00:25:17Z","updated_at":"2016-12-12T11:29:57Z","pushed_at":"2016-12-12T11:09:05Z","git_url":"git://github.com/greenplum-db/gpdb.git","ssh_url":"git@github.com:greenplum-db/gpdb.git","clone_url":"https://github.com/greenplum-db/gpdb.git","svn_url":"https://github.com/greenplum-db/gpdb","homepage":"http://greenplum.org","size":234199,"stargazers_count":1719,"watchers_count":1719,"language":"PLpgSQL","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":501,"mirror_url":null,"open_issues_count":117,"forks":501,"open_issues":117,"watchers":1719,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436"},"html":{"href":"https://github.com/greenplum-db/gpdb/pull/1436"},"issue":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/1436"},"comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/issues/1436/comments"},"review_comments":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436/comments"},"review_comment":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenplum-db/gpdb/pulls/1436/commits"},"statuses":{"href":"https://api.github.com/repos/greenplum-db/gpdb/statuses/b8c4814756dff63cd19e8bee063d5a88b4633246"}}}}
{"actor":{"display_login":"hlinnaka"}}