[odb-users] ODB 2.1 on PostgreSQL

Boris Kolpackov boris at codesynthesis.com
Fri Sep 21 03:47:45 EDT 2012


Hi Simon,

Simon Riggs <simon at 2ndQuadrant.com> writes:

> > It would have been much easier if Postgres just had a separate
> > error code for a primary key violation, like MySQL ;-).
> 
> How important is that? The patch for that is simple, but the
> management of the change would require us to have a config parameter
> to provide backwards compatibility. So it wouldn't be an easy sell....

SQLite uses an interesting mechanism called extended error codes.
Basically, for some "primary" error codes one can also ask for an
extended code which further qualifies the error (e.g., primary key
violation vs foreign key vs unique, etc).

But, I agree, it would probably be easier to hack something up in
ODB than to make this change in PostgreSQL.



More information about the odb-users mailing list