From: <an...@ne...> - 2006-08-18 13:19:19
|
Hello all, I've stumbled upon a bug in the PostgreSQL implementation of the Perl obj= ect layer: when generating Perl objects, most childRelations are missing even= if the PostgreSQL database contains the relevant FK constraint. The same bug shows up on two different PostgreSQL versions, namely 8.1.4 = and 7.4.13. The problem lies in file '$PROJECT_HOME/GUS/ObjRelP/lib/perl/PostgreSQL.p= m': the subroutine 'tableChildRelationsSql' returns incorrect (schema names a= re reversed) and incomplete (filtering by schema name discards relations to external schemas) data. I'm attaching a file 'query.pl' that shows the problem on child relations= for table 'GUS::Model::SRes::Contact', and a modified version of PostgreSQL.p= m with a query that works correctly for me. Here is the output with the original query: TABLE GUS::Model::SRes::Contact ---- Child relations from $db->getTableChildRelations GUS::Model::SRes::BibliographicReference, contact_id, contact_id GUS::Model::SRes::Contact, contact_id, affiliation_id ------------ While this is the output with the modified SQL (incidentally, this very s= ame output should be what is obtained from a working installation on Oracle): TABLE GUS::Model::SRes::Contact ---- Child relations from $db->getTableChildRelations GUS::Model::Core::UserInfo, contact_id, contact_id GUS::Model::DoTS::AASequenceEnzymeClass, contact_id, ec_assignment_contac= t_id GUS::Model::DoTS::Attribution, contact_id, contact_id GUS::Model::DoTS::CloneSet, contact_id, contact_id GUS::Model::DoTS::EST, contact_id, contact_id GUS::Model::DoTS::NASequenceImp, contact_id, sequencing_center_contact_id GUS::Model::RAD::Analysis, contact_id, operator_id GUS::Model::RAD::ArrayDesign, contact_id, manufacturer_id GUS::Model::RAD::Assay, contact_id, operator_id GUS::Model::RAD::Quantification, contact_id, operator_id GUS::Model::SRes::BibliographicReference, contact_id, contact_id GUS::Model::SRes::Contact, contact_id, affiliation_id GUS::Model::Study::BioMaterialImp, contact_id, bio_source_provider_id GUS::Model::Study::Study, contact_id, contact_id ------------ Is there anyone using GUSDB on PostgreSQL who can confirm this issue and = test that my solution does not break anything else? Thanks a lot in advance, Antonio Galea ---------------------------------------------------------------- Net Wise webmail system - http://www.netwise.it This message was sent using IMP, the Internet Messaging Program. |