JUN 27
2008

Three more reasons I prefer PostgreSQL over MySQL:

First: MySQL only supports constants in default clauses. In other words, this is forbidden:

create table times ( time1 datetime default now(), time2 datetime default now() );

Things are even more complicated when you look into why MySQL has the very confusing situation of a datetime type and a timestamp type. And, in my opinion, the MySQL documentation on the subject is poorly formatted, at least in comparison to PostgreSQL's documentation.

Second: MySQL date/time fields don't support microsecond resolution! Aye-yah. Yet another feature that needs to be handled in application code when it really belongs in the database.

Third: The MySQL time zone support seems very clunky to the point where it's easier just to store everything as GMT and handle conversions at the application layer.

PostgreSQL handles all of these issues no problem.


tags: mysql-woes
permalink | comments | technorati
blog comments powered by Disqus