Subject: | Problem with autoincrement id fields and PostgreSQL |
The MySQL schema for Email::Store::Attachment and Email::Store::Entity have autoincrement integer fields for "id". MySQL implements this is a highly non -standard way. For PostgreSQL this is translated to an integer field that defaults to the next value of a sequence (SQL03).
Unfortunatly, when Class::DBI generates SQL it specifies a null id instead of leaving it out. This works for MySQL's autoincrement type, but fails when using a default value. This is yet another critical error for PostgreSQL and probably other databases as well.
I'm not sure what a good solution is. It looks like the id field can just be dropped for the attachment table but the entity tables are trickier. I'll see if I can think of something and send in a patch.
Either way, the autoincrement syntax is 100% non-portable. Either it or the advertised support for non-MySQL databases needs to be removed.