[Biopython-dev] [Bug 2833] Features insertion on previous bioentry_id
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Tue Jun 2 10:51:34 UTC 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2833
------- Comment #17 from biopython-bugzilla at maubp.freeserve.co.uk 2009-06-02 06:51 EST -------
Cymon (and Andrea),
How do you feel about these pragmatic (short term) options:
Option (a): At import time, if the rules are present issue a warning,
suggesting the user fix their database schema.
Option (b): If the user tries to load a record and the rules are present, raise
an exception error suggesting the user fix their database schema.
Either options (a) or (b) would be a problem for anyone trying to use BioPerl
and Biopython with a PostgreSQL BioSQL database - but this is still an
improvement on the current situation.
However, I'm pleased see you (Cymon) have made some progress towards an ideal
situation (until Bug 2839 is fixed), where Biopython could cope with the "evil"
rules in the default PostgreSQL schema:
Option (c): Even if the rules are present, and a key clash would happen, issue
an IntegrityError.
The details of how we might do this remain to be resolved...
The idea of checking the bioentry table count imposes a performance penalty
from this extra query, but also as you note in comment 16 in some ways this is
"too late" (a transaction rollback is required).
How do you feel about this simplistic solution?: if the rules are present,
before loading a new record, do a query to check to make sure there isn't a
duplicate already present, and if there is raise an IntegrityError. There is
still a performance penalty from this extra query, but it avoids any issues
with having to roll back partial transactions.
Peter
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list