Monday, May 08, 2006

Why I hate MySQL

Non standard way of quoting table- and column names

Postgresql: SELECT * FROM "Order";
Mysql: SELECT * FROM `Order`;

Default values for columns must be a constant

Postgresql: CREATE TABLE mytable (id char(32) not null default somefunction(), x int);
Mysql: no equivalent, only auto_increment and now special cases handled.

Triggers cannot cause insert/update to fail.

There is a workarround for this, but this really should be implemented properly. Granted, procedural language support is still new, this will probably be fixed.


Group by allows selecting from columns that is NOT in the group by clause

This is in fact called a feature by the documentation, but allows people to write horribly broken queries.