By default MySQL created myisam engine tables, which does not support transactions or foreign keys, you need to explicitly force transactional innodb engine while creating a table.
By default MySQL accepts invalid data, like date '2010-02-30', silently truncates too long textual data, too big numbers etc. But you can change it for INNODB tables using SET sql_mode = 'STRICT_TRANS_TABLES';
on mysql 5.0.2 and up - see "Constraints on Invalid Data".
MySQL does not support check constraints at all, so you can not for example:
- force integer data to be at some
range;
- force text data to be at some format (for example valid e-mail
address or valid url);
- limit text data to valid characters (only ASCII, only ISO-8859-1, only
numbers and minus etc.);
- disallow spaces, newlines, double-spaces, spaces at the end etc.
or empty text data.
So all data validation has to be done in client application. Which is harder to do and more error-prone.
All of this is not a problem in PostgreSQL.