{"action":"closed","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/305","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/305/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/305/events","html_url":"https://github.com/npgsql/npgsql/issues/305","id":39301353,"number":305,"title":"Npgsql doesn't support pass parameters by name to functions","user":{"login":"franciscojunior","id":829924,"avatar_url":"https://avatars.githubusercontent.com/u/829924?v=3","gravatar_id":"","url":"https://api.github.com/users/franciscojunior","html_url":"https://github.com/franciscojunior","followers_url":"https://api.github.com/users/franciscojunior/followers","following_url":"https://api.github.com/users/franciscojunior/following{/other_user}","gists_url":"https://api.github.com/users/franciscojunior/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscojunior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscojunior/subscriptions","organizations_url":"https://api.github.com/users/franciscojunior/orgs","repos_url":"https://api.github.com/users/franciscojunior/repos","events_url":"https://api.github.com/users/franciscojunior/events{/privacy}","received_events_url":"https://api.github.com/users/franciscojunior/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npgsql/npgsql/labels/feature","name":"feature","color":"009800"},{"url":"https://api.github.com/repos/npgsql/npgsql/labels/up%20for%20grabs","name":"up for grabs","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"Emill","id":1660778,"avatar_url":"https://avatars.githubusercontent.com/u/1660778?v=3","gravatar_id":"","url":"https://api.github.com/users/Emill","html_url":"https://github.com/Emill","followers_url":"https://api.github.com/users/Emill/followers","following_url":"https://api.github.com/users/Emill/following{/other_user}","gists_url":"https://api.github.com/users/Emill/gists{/gist_id}","starred_url":"https://api.github.com/users/Emill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emill/subscriptions","organizations_url":"https://api.github.com/users/Emill/orgs","repos_url":"https://api.github.com/users/Emill/repos","events_url":"https://api.github.com/users/Emill/events{/privacy}","received_events_url":"https://api.github.com/users/Emill/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2014-08-01T15:39:40Z","updated_at":"2015-08-23T20:04:41Z","closed_at":"2015-08-23T20:04:41Z","body":"\r\nOpen by Alexander Koval\r\nFrom pgfoundry: http://pgfoundry.org/tracker/index.php?func=detail&aid=1010781&group_id=1000140&atid=590\r\n\r\n```\r\nTable\r\n\r\nCREATE TABLE \"Image\"\r\n(\r\n\"Name\" character varying(50),\r\n\"Description\" character varying(250),\r\n\"ImageID\" serial NOT NULL,\r\nCONSTRAINT pk_image PRIMARY KEY (\"ImageID\")\r\n)\r\n```\r\nI have the next function\r\n\r\n```\r\nCREATE OR REPLACE FUNCTION \"ImageInsert\"(pname character varying, pdescription character varying)\r\nRETURNS \"Image\" AS\r\n$BODY$\r\n\r\nDECLARE\r\nres \"Image\"%ROWTYPE;\r\npImageID \"Image\".\"ImageID\"%type;\r\n\r\nBEGIN\r\npImageID:= nextval('\"Image_ImageID_seq\"');\r\ninsert into \"Image\"(\"ImageID\", \"Name\", \"Description\") values(pImageID, pName, pDescription);\r\n\r\nselect * into res from \"Image\" where \"ImageID\" = pImageID;\r\nreturn res;\r\n\r\nEND;\r\n$BODY$\r\nLANGUAGE 'plpgsql'\r\n```\r\n\r\nThen I do these actions\r\n```\r\nNpgsqlCommand cmd1 = CreateNpgsqlCommand();\r\ncmd1.CreateParameter(\"pname\",\"image name1\");\r\ncmd1.CreateParameter(\"pdescription\",\"image description1\");\r\n\r\nNpgsqlCommand cmd2 = CreateNpgsqlCommand();\r\ncmd2.CreateParameter(\"pdescription\",\"image description2\");\r\ncmd2.CreateParameter(\"pname\",\"image name2\");\r\n```\r\n\r\nLet's look at the data\r\n\r\n`select * from \"Image\"`\r\n\r\nSurprise!\r\n```\r\n\"image name1\";\"image description1\";1;\r\n\"image description2\";\"image name 2\";2;\r\n```"}}