{"action":"created","issue":{"url":"https://api.github.com/repos/sfackler/rust-postgres/issues/256","repository_url":"https://api.github.com/repos/sfackler/rust-postgres","labels_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/256/comments","events_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/256/events","html_url":"https://github.com/sfackler/rust-postgres/issues/256","id":226148934,"number":256,"title":"Support the 'unknown' type","user":{"login":"kkartaltepe","id":526419,"avatar_url":"https://avatars2.githubusercontent.com/u/526419?v=3","gravatar_id":"","url":"https://api.github.com/users/kkartaltepe","html_url":"https://github.com/kkartaltepe","followers_url":"https://api.github.com/users/kkartaltepe/followers","following_url":"https://api.github.com/users/kkartaltepe/following{/other_user}","gists_url":"https://api.github.com/users/kkartaltepe/gists{/gist_id}","starred_url":"https://api.github.com/users/kkartaltepe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkartaltepe/subscriptions","organizations_url":"https://api.github.com/users/kkartaltepe/orgs","repos_url":"https://api.github.com/users/kkartaltepe/repos","events_url":"https://api.github.com/users/kkartaltepe/events{/privacy}","received_events_url":"https://api.github.com/users/kkartaltepe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-04T00:14:08Z","updated_at":"2017-07-08T23:47:27Z","closed_at":"2017-05-23T05:04:54Z","body":"From this mail thread https://www.postgresql.org/message-id/1179.1302203983%40sss.pgh.pa.us\r\nand some documentation on type conversion https://www.postgresql.org/docs/9.5/static/typeconv-oper.html\r\n\r\nUnknown types can only arise from string literals or NULL literals. So it should be possible to implement conversion of these types to `Option<String>`. If it is a NULL literal instead of a string literal it is safe to represent it as a `None<T>`. Because the only unknown type literals allowable in postgres are String and NULL combined with the fact that only string types can be cast to 'unknown' this kind of conversion should be safe on the rust side.\r\n\r\nThis just a nice to have when working with queries involving literal strings or NULLs as 'unknown' type can propagate up selects, although it is unlikely to be encountered in normal database objects."},"comment":{"url":"https://api.github.com/repos/sfackler/rust-postgres/issues/comments/313887876","html_url":"https://github.com/sfackler/rust-postgres/issues/256#issuecomment-313887876","issue_url":"https://api.github.com/repos/sfackler/rust-postgres/issues/256","id":313887876,"user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars3.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":"2017-07-08T23:47:27Z","updated_at":"2017-07-08T23:47:27Z","body":"Interestingly , the column type in `select 'hello world'` is now `text` rather than `unknown` in PostgreSQL 10."}}
{"actor":{"display_login":"sfackler"}}