r/programming • u/squareproton • Nov 16 '14
PostgreSQL vs. MS SQL Server - A comparison of two relational databases from the point of view of a data analyst
http://www.pg-versus-ms.com/
171
Upvotes
r/programming • u/squareproton • Nov 16 '14
5
u/squareproton Nov 17 '14
Sorry, these interval types you're describing are nothing like PostgreSQL's ones, which are first-class values you can do arithmetic on and use intuitively. For example if you subtract one date from another, an interval is returned. Datediff just counts boundaries crossed, it doesn't give you a usable value representing a duration that you can then do stuff with. As for casting, your solution seems to be "don't do it", which is not an option. What are you to do if someone gives you a couple of million rows of data with silly-format dates in it? Remember I'm coming at this from an analytics perspective, where flexibility and control are absolutely key.