{"action":"created","issue":{"url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/435","repository_url":"https://api.github.com/repos/vitaly-t/pg-promise","labels_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/435/labels{/name}","comments_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/435/comments","events_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/435/events","html_url":"https://github.com/vitaly-t/pg-promise/issues/435","id":283321634,"number":435,"title":"Issue with :csv in Prepared Statements","user":{"login":"njlr","id":1577531,"avatar_url":"https://avatars2.githubusercontent.com/u/1577531?v=4","gravatar_id":"","url":"https://api.github.com/users/njlr","html_url":"https://github.com/njlr","followers_url":"https://api.github.com/users/njlr/followers","following_url":"https://api.github.com/users/njlr/following{/other_user}","gists_url":"https://api.github.com/users/njlr/gists{/gist_id}","starred_url":"https://api.github.com/users/njlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njlr/subscriptions","organizations_url":"https://api.github.com/users/njlr/orgs","repos_url":"https://api.github.com/users/njlr/repos","events_url":"https://api.github.com/users/njlr/events{/privacy}","received_events_url":"https://api.github.com/users/njlr/received_events","type":"User","site_admin":false},"labels":[{"id":183000955,"url":"https://api.github.com/repos/vitaly-t/pg-promise/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-12-19T18:08:36Z","updated_at":"2017-12-20T10:12:39Z","closed_at":"2017-12-20T10:03:45Z","author_association":"NONE","body":"I have a query like this: \r\n\r\n```javascript=\r\n    const things = [ 'apples', 'oranges' ];\r\n    const q = {\r\n      name: 'my-query', \r\n      text: ```INSERT INTO things (id, name)\r\n        SELECT \r\n          1 AS id, \r\n          name\r\n        FROM unnest(ARRAY[ ($1:csv) ]) name ```,\r\n      values: [ things ]\r\n    };\r\n    await db.query(q);\r\n```\r\n\r\nBut this gives the error: \r\n\r\n    TypeError: \"\" is not a function...\r\n\r\nHave I misunderstood `:csv`? "},"comment":{"url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/comments/353022262","html_url":"https://github.com/vitaly-t/pg-promise/issues/435#issuecomment-353022262","issue_url":"https://api.github.com/repos/vitaly-t/pg-promise/issues/435","id":353022262,"user":{"login":"vitaly-t","id":5108906,"avatar_url":"https://avatars1.githubusercontent.com/u/5108906?v=4","gravatar_id":"","url":"https://api.github.com/users/vitaly-t","html_url":"https://github.com/vitaly-t","followers_url":"https://api.github.com/users/vitaly-t/followers","following_url":"https://api.github.com/users/vitaly-t/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-t/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-t/subscriptions","organizations_url":"https://api.github.com/users/vitaly-t/orgs","repos_url":"https://api.github.com/users/vitaly-t/repos","events_url":"https://api.github.com/users/vitaly-t/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-t/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T10:12:39Z","updated_at":"2017-12-20T10:12:39Z","author_association":"OWNER","body":"P.S. I have just asked a related question on StackOverflow: [Nested template string error in Node.js\r\n](https://stackoverflow.com/questions/47903470/nested-template-string-error-in-node-js)."}}
{"actor":{"display_login":"vitaly-t"}}