{"action":"created","issue":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/557","labels_url":"https://api.github.com/repos/npgsql/npgsql/issues/557/labels{/name}","comments_url":"https://api.github.com/repos/npgsql/npgsql/issues/557/comments","events_url":"https://api.github.com/repos/npgsql/npgsql/issues/557/events","html_url":"https://github.com/npgsql/npgsql/issues/557","id":64661957,"number":557,"title":"-infinity no longer supported?","user":{"login":"oldsaltycrab","id":7470552,"avatar_url":"https://avatars.githubusercontent.com/u/7470552?v=3","gravatar_id":"","url":"https://api.github.com/users/oldsaltycrab","html_url":"https://github.com/oldsaltycrab","followers_url":"https://api.github.com/users/oldsaltycrab/followers","following_url":"https://api.github.com/users/oldsaltycrab/following{/other_user}","gists_url":"https://api.github.com/users/oldsaltycrab/gists{/gist_id}","starred_url":"https://api.github.com/users/oldsaltycrab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oldsaltycrab/subscriptions","organizations_url":"https://api.github.com/users/oldsaltycrab/orgs","repos_url":"https://api.github.com/users/oldsaltycrab/repos","events_url":"https://api.github.com/users/oldsaltycrab/events{/privacy}","received_events_url":"https://api.github.com/users/oldsaltycrab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"roji","id":1862641,"avatar_url":"https://avatars.githubusercontent.com/u/1862641?v=3","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-03-27T00:11:39Z","updated_at":"2015-03-29T07:15:53Z","closed_at":null,"body":"At a relatively recent revision (4e728f1061e41e25e86089e2499452eac46de465), selecting a ```datetime``` column from a table which has a ```-infinity``` value throws an exception: ```Can't convert infinite timestamp values to DateTime```.\r\n\r\nIt's a very explicit exception, checking that the ```NpgsqlDateTime``` is finite, making me think that the support for ```-infinity``` is gone?  Did the +/- infinity used to return DateTime.Max/Min?\r\n\r\nOur production npgsql (2.2.5) handles these values."},"comment":{"url":"https://api.github.com/repos/npgsql/npgsql/issues/comments/87365167","html_url":"https://github.com/npgsql/npgsql/issues/557#issuecomment-87365167","issue_url":"https://api.github.com/repos/npgsql/npgsql/issues/557","id":87365167,"user":{"login":"roji","id":1862641,"avatar_url":"https://avatars.githubusercontent.com/u/1862641?v=3","gravatar_id":"","url":"https://api.github.com/users/roji","html_url":"https://github.com/roji","followers_url":"https://api.github.com/users/roji/followers","following_url":"https://api.github.com/users/roji/following{/other_user}","gists_url":"https://api.github.com/users/roji/gists{/gist_id}","starred_url":"https://api.github.com/users/roji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roji/subscriptions","organizations_url":"https://api.github.com/users/roji/orgs","repos_url":"https://api.github.com/users/roji/repos","events_url":"https://api.github.com/users/roji/events{/privacy}","received_events_url":"https://api.github.com/users/roji/received_events","type":"User","site_admin":false},"created_at":"2015-03-29T07:15:53Z","updated_at":"2015-03-29T07:15:53Z","body":"For me this is a discussion mostly about breakage and backwards compatibility. If we didn't have an existing user base I'd definitely be against mapping infinity values to DateTime.{Max,Min}Value - I actually think most of us agree on this.\r\n\r\nHowever... @Emill, you're right that if you want to abstract the database you shouldn't be using infinity values. The problem is that Npgsql 2.2 does that for you without asking - people writing DateTime.MaxValue got infinity in their database. If we change this we basically break anyone who's used Npgsql to right max/min values. It's true that we're already breaking a lot of things in v3, but I think that this would be a pretty rare *data breakage*, as opposed to just asking users to adjust their code (it's true we can tell them to move to NpgsqlDateTime, but to do so *only* because Npgsql v2 put infinity values in their database...).\r\n\r\nI'm really not sure what the right decision here is. I can *sort of* tell myself the story that the meaning of infinity varies based on the data type you load it as, and so it's OK to map it to DateTime.MaxValue. I'm also sure that having this ambiguity will bite people down the road, as one programmer loads an infinity value as NpgsqlDateTime and another as DateTime, and somewhere along the way they get compared."}}