{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/citus/pulls/comments/79774277","id":79774277,"diff_hunk":"@@ -247,6 +247,104 @@ SELECT plpgsql_test_2();\n -- SELECT plpgsql_test_6(155);\n -- SELECT plpgsql_test_6(1555);\n \n+-- test router executor parameterized PL/pgsql functions\n+CREATE TABLE temp_table (\n+\tkey int,\n+\tvalue int\n+);\n+SELECT master_create_distributed_table('temp_table','key','hash');\n+SELECT master_create_worker_shards('temp_table',4,1);\n+\n+CREATE OR REPLACE FUNCTION no_parameter_insert() RETURNS void as $$\n+BEGIN\n+\tINSERT INTO temp_table (key) VALUES (0);\n+END;\n+$$ LANGUAGE plpgsql;\n+\n+SELECT no_parameter_insert();\n+SELECT no_parameter_insert();\n+SELECT no_parameter_insert();\n+SELECT no_parameter_insert();\n+SELECT no_parameter_insert();\n+SELECT no_parameter_insert();\n+\n+CREATE OR REPLACE FUNCTION single_parameter_insert(key_arg int) RETURNS void as $$\n+BEGIN\n+\tINSERT INTO temp_table (key) VALUES (key_arg);\n+END;\n+$$ LANGUAGE plpgsql;\n+\n+SELECT single_parameter_insert(1);\n+SELECT single_parameter_insert(2);\n+SELECT single_parameter_insert(3);\n+SELECT single_parameter_insert(4);\n+SELECT single_parameter_insert(5);\n+SELECT single_parameter_insert(6);\n+\n+CREATE OR REPLACE FUNCTION double_parameter_insert(key_arg int, value_arg int) RETURNS void as $$\n+BEGIN\n+\tINSERT INTO temp_table (key, value) VALUES (key_arg, value_arg);\n+END;\n+$$ LANGUAGE plpgsql;\n+\n+SELECT double_parameter_insert(1, 10);\n+SELECT double_parameter_insert(2, 20);\n+SELECT double_parameter_insert(3, 30);\n+SELECT double_parameter_insert(4, 40);\n+SELECT double_parameter_insert(5, 50);\n+SELECT double_parameter_insert(6, 60);\n+\n+-- check inserted values\n+SELECT * FROM temp_table ORDER BY key, value;\n+\n+-- check router executor select\n+CREATE OR REPLACE FUNCTION partition_column_select(key_arg int) RETURNS TABLE(key int, value int) AS $$\n+DECLARE\n+BEGIN\n+    RETURN QUERY\n+\tSELECT\n+\t\ttemp_table.key,\n+\t\ttemp_table.value\n+\tFROM\n+\t\ttemp_table\n+\tWHERE\n+\t\ttemp_table.key = key_arg\n+\tORDER BY\n+\t\tkey,\n+\t\tvalue;\n+END;\n+$$ LANGUAGE plpgsql;\n+\n+SELECT partition_column_select(1);\n+SELECT partition_column_select(2);\n+SELECT partition_column_select(3);\n+SELECT partition_column_select(4);\n+SELECT partition_column_select(5);\n+\n+-- check real-time executor\n+CREATE OR REPLACE FUNCTION non_partition_column_select(value_arg int) RETURNS TABLE(key int, value int) AS $$\n+DECLARE\n+BEGIN\n+    RETURN QUERY\n+\tSELECT\n+\t\ttemp_table.key,\n+\t\ttemp_table.value\n+\tFROM\n+\t\ttemp_table\n+\tWHERE\n+\t\ttemp_table.value = value_arg\n+\tORDER BY\n+\t\tkey,\n+\t\tvalue;\n+END;\n+$$ LANGUAGE plpgsql;\n+\n+SELECT non_partition_column_select(10);\n+SELECT non_partition_column_select(20);\n+SELECT non_partition_column_select(30);\n+SELECT non_partition_column_select(40);\n+SELECT non_partition_column_select(50);","path":"src/test/regress/sql/multi_prepare_plsql.sql","position":100,"original_position":100,"commit_id":"fb9e829d006f7e35ac39dbc388ed0f6c5b25bdd1","original_commit_id":"fb9e829d006f7e35ac39dbc388ed0f6c5b25bdd1","user":{"login":"metdos","id":149191,"avatar_url":"https://avatars.githubusercontent.com/u/149191?v=3","gravatar_id":"","url":"https://api.github.com/users/metdos","html_url":"https://github.com/metdos","followers_url":"https://api.github.com/users/metdos/followers","following_url":"https://api.github.com/users/metdos/following{/other_user}","gists_url":"https://api.github.com/users/metdos/gists{/gist_id}","starred_url":"https://api.github.com/users/metdos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metdos/subscriptions","organizations_url":"https://api.github.com/users/metdos/orgs","repos_url":"https://api.github.com/users/metdos/repos","events_url":"https://api.github.com/users/metdos/events{/privacy}","received_events_url":"https://api.github.com/users/metdos/received_events","type":"User","site_admin":false},"body":"This is similar to above comment. After 5th execution, we get errors in unpredictable orders.","created_at":"2016-09-21T07:33:16Z","updated_at":"2016-09-21T07:33:16Z","html_url":"https://github.com/citusdata/citus/pull/770#discussion_r79774277","pull_request_url":"https://api.github.com/repos/citusdata/citus/pulls/770","_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments/79774277"},"html":{"href":"https://github.com/citusdata/citus/pull/770#discussion_r79774277"},"pull_request":{"href":"https://api.github.com/repos/citusdata/citus/pulls/770"}}},"pull_request":{"url":"https://api.github.com/repos/citusdata/citus/pulls/770","id":84112626,"html_url":"https://github.com/citusdata/citus/pull/770","diff_url":"https://github.com/citusdata/citus/pull/770.diff","patch_url":"https://github.com/citusdata/citus/pull/770.patch","issue_url":"https://api.github.com/repos/citusdata/citus/issues/770","number":770,"state":"open","locked":false,"title":"Pass text oid instead of invalid oid for null values","user":{"login":"metdos","id":149191,"avatar_url":"https://avatars.githubusercontent.com/u/149191?v=3","gravatar_id":"","url":"https://api.github.com/users/metdos","html_url":"https://github.com/metdos","followers_url":"https://api.github.com/users/metdos/followers","following_url":"https://api.github.com/users/metdos/following{/other_user}","gists_url":"https://api.github.com/users/metdos/gists{/gist_id}","starred_url":"https://api.github.com/users/metdos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metdos/subscriptions","organizations_url":"https://api.github.com/users/metdos/orgs","repos_url":"https://api.github.com/users/metdos/repos","events_url":"https://api.github.com/users/metdos/events{/privacy}","received_events_url":"https://api.github.com/users/metdos/received_events","type":"User","site_admin":false},"body":"Passing invalid oids even for null values in PQsendQueryParams() causes worker\r\nnodes to fail. Therefore, we pass text oid for null values.\r\n\r\nFixes #752.","created_at":"2016-09-06T12:26:27Z","updated_at":"2016-09-21T07:33:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19367867ab7c683a6091f6929cb03ed30f437a3a","assignee":{"login":"anarazel","id":1598211,"avatar_url":"https://avatars.githubusercontent.com/u/1598211?v=3","gravatar_id":"","url":"https://api.github.com/users/anarazel","html_url":"https://github.com/anarazel","followers_url":"https://api.github.com/users/anarazel/followers","following_url":"https://api.github.com/users/anarazel/following{/other_user}","gists_url":"https://api.github.com/users/anarazel/gists{/gist_id}","starred_url":"https://api.github.com/users/anarazel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarazel/subscriptions","organizations_url":"https://api.github.com/users/anarazel/orgs","repos_url":"https://api.github.com/users/anarazel/repos","events_url":"https://api.github.com/users/anarazel/events{/privacy}","received_events_url":"https://api.github.com/users/anarazel/received_events","type":"User","site_admin":false},"assignees":[{"login":"anarazel","id":1598211,"avatar_url":"https://avatars.githubusercontent.com/u/1598211?v=3","gravatar_id":"","url":"https://api.github.com/users/anarazel","html_url":"https://github.com/anarazel","followers_url":"https://api.github.com/users/anarazel/followers","following_url":"https://api.github.com/users/anarazel/following{/other_user}","gists_url":"https://api.github.com/users/anarazel/gists{/gist_id}","starred_url":"https://api.github.com/users/anarazel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarazel/subscriptions","organizations_url":"https://api.github.com/users/anarazel/orgs","repos_url":"https://api.github.com/users/anarazel/repos","events_url":"https://api.github.com/users/anarazel/events{/privacy}","received_events_url":"https://api.github.com/users/anarazel/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/citusdata/citus/pulls/770/commits","review_comments_url":"https://api.github.com/repos/citusdata/citus/pulls/770/comments","review_comment_url":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citusdata/citus/issues/770/comments","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/fb9e829d006f7e35ac39dbc388ed0f6c5b25bdd1","head":{"label":"citusdata:fix/insert_query_inside_plpgsql","ref":"fix/insert_query_inside_plpgsql","sha":"fb9e829d006f7e35ac39dbc388ed0f6c5b25bdd1","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-09-21T07:10:53Z","pushed_at":"2016-09-21T07:19:55Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":3516,"stargazers_count":1590,"watchers_count":1590,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":392,"forks":111,"open_issues":392,"watchers":1590,"default_branch":"master"}},"base":{"label":"citusdata:master","ref":"master","sha":"a0fa7bf130861fdd92426f314e167226c2b19b20","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2016-09-21T07:10:53Z","pushed_at":"2016-09-21T07:19:55Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":3516,"stargazers_count":1590,"watchers_count":1590,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":392,"forks":111,"open_issues":392,"watchers":1590,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/770"},"html":{"href":"https://github.com/citusdata/citus/pull/770"},"issue":{"href":"https://api.github.com/repos/citusdata/citus/issues/770"},"comments":{"href":"https://api.github.com/repos/citusdata/citus/issues/770/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/citus/pulls/770/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citusdata/citus/pulls/770/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/citus/statuses/fb9e829d006f7e35ac39dbc388ed0f6c5b25bdd1"}}}}
{"actor":{"display_login":"metdos"}}