{"action":"created","issue":{"url":"https://api.github.com/repos/sfackler/rust-postgres/issues/128","labels_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/128/comments","events_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/128/events","html_url":"https://github.com/sfackler/rust-postgres/issues/128","id":83161392,"number":128,"title":"insert returning id","user":{"login":"vrcod","id":7830018,"avatar_url":"https://avatars.githubusercontent.com/u/7830018?v=3","gravatar_id":"","url":"https://api.github.com/users/vrcod","html_url":"https://github.com/vrcod","followers_url":"https://api.github.com/users/vrcod/followers","following_url":"https://api.github.com/users/vrcod/following{/other_user}","gists_url":"https://api.github.com/users/vrcod/gists{/gist_id}","starred_url":"https://api.github.com/users/vrcod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrcod/subscriptions","organizations_url":"https://api.github.com/users/vrcod/orgs","repos_url":"https://api.github.com/users/vrcod/repos","events_url":"https://api.github.com/users/vrcod/events{/privacy}","received_events_url":"https://api.github.com/users/vrcod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-31T19:06:07Z","updated_at":"2015-05-31T19:21:50Z","closed_at":null,"body":"Postgres has the \"insert returning id\" (http://www.postgresql.org/docs/9.4/static/sql-insert.html) functionality, is it possible to use this with existing functionality or is this something not yet implemented?"},"comment":{"url":"https://api.github.com/repos/sfackler/rust-postgres/issues/comments/107237988","html_url":"https://github.com/sfackler/rust-postgres/issues/128#issuecomment-107237988","issue_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/128","id":107237988,"user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"created_at":"2015-05-31T19:21:50Z","updated_at":"2015-05-31T19:21:50Z","body":"Yep, it'll act like a normal query that returns a row set\r\n\r\n```rust\r\nlet stmt = try!(conn.prepare(\"INSERT INTO foo (bar) VALUES ('baz') RETURNING id\"));\r\nlet id: i32 = try!(stmt.query(&[])).iter().next().unwrap().get(0);\r\n```"}}