{"action":"created","issue":{"url":"https://api.github.com/repos/go-pg/pg/issues/134","repository_url":"https://api.github.com/repos/go-pg/pg","labels_url":"https://api.github.com/repos/go-pg/pg/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/go-pg/pg/issues/134/comments","events_url":"https://api.github.com/repos/go-pg/pg/issues/134/events","html_url":"https://github.com/go-pg/pg/issues/134","id":142636651,"number":134,"title":"How to get inserted auto_incremented value?","user":{"login":"zengfenfei","id":773310,"avatar_url":"https://avatars.githubusercontent.com/u/773310?v=3","gravatar_id":"","url":"https://api.github.com/users/zengfenfei","html_url":"https://github.com/zengfenfei","followers_url":"https://api.github.com/users/zengfenfei/followers","following_url":"https://api.github.com/users/zengfenfei/following{/other_user}","gists_url":"https://api.github.com/users/zengfenfei/gists{/gist_id}","starred_url":"https://api.github.com/users/zengfenfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zengfenfei/subscriptions","organizations_url":"https://api.github.com/users/zengfenfei/orgs","repos_url":"https://api.github.com/users/zengfenfei/repos","events_url":"https://api.github.com/users/zengfenfei/events{/privacy}","received_events_url":"https://api.github.com/users/zengfenfei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-22T12:37:48Z","updated_at":"2016-03-22T12:45:47Z","closed_at":null,"body":"The table:\r\n```sql\r\ncreate table users (\r\nid bigserial primary key,\r\nname varchar(512) not null)\r\n```\r\nI insert a user using:\r\n```go\r\ntype User struct {\r\n\tId       int64\r\n\tName     string\r\n}\r\n\r\nvar db pg.DB\r\nvar u User\r\ndb.Create(&u)\r\n```\r\n\r\nSo how can I get the **auto_incremented** id?"},"comment":{"url":"https://api.github.com/repos/go-pg/pg/issues/comments/199794848","html_url":"https://github.com/go-pg/pg/issues/134#issuecomment-199794848","issue_url":"https://api.github.com/repos/go-pg/pg/issues/134","id":199794848,"user":{"login":"zengfenfei","id":773310,"avatar_url":"https://avatars.githubusercontent.com/u/773310?v=3","gravatar_id":"","url":"https://api.github.com/users/zengfenfei","html_url":"https://github.com/zengfenfei","followers_url":"https://api.github.com/users/zengfenfei/followers","following_url":"https://api.github.com/users/zengfenfei/following{/other_user}","gists_url":"https://api.github.com/users/zengfenfei/gists{/gist_id}","starred_url":"https://api.github.com/users/zengfenfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zengfenfei/subscriptions","organizations_url":"https://api.github.com/users/zengfenfei/orgs","repos_url":"https://api.github.com/users/zengfenfei/repos","events_url":"https://api.github.com/users/zengfenfei/events{/privacy}","received_events_url":"https://api.github.com/users/zengfenfei/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T12:45:47Z","updated_at":"2016-03-22T12:45:47Z","body":"The sql go-pg generated is: `INSERT INTO \"users\" (\"name\", \"password\") VALUES ('from Termial', '')`\r\n"}}