I've created a couple of patches for the relationship module to give it PostgreSQL compatibility, but I've stalled on an odd bug when trying to edit anything in the ontology_foaf.
The error is:
# warning: pg_query() [function.pg-query]: Query failed: ERROR: invalid input syntax for integer: "DatatypeProperty" in /www/drupal/sandbox-4.7.3/includes/database.pgsql.inc on line 84.
# user warning: query: SELECT * FROM relationship_statement WHERE (0 = 'DatatypeProperty') ORDER BY predicate, object in /www/drupal/sandbox-4.7.3/includes/database.pgsql.inc on line 103.
The patches I'm going to post in sequence here are for the 2006-09-13 version of the module:
relationship.install: updated code to write in postgresql-compatible table and index.
rdf_datastore.inc: updated quoting to work on postgresql and mysql alike.
relationship_api.inc: line 845, new condition for RLIKE on PGSQL: ~* for regexp matching.
These need testing on mysql if they're eventually included. But since this module is so unstable I'm going to leave it at this.
Comment | File | Size | Author |
---|---|---|---|
#6 | relationship.install_0.patch | 899 bytes | PMunn |
#2 | rdf_datastore.inc.patch | 937 bytes | PMunn |
#1 | relationship_api.inc.patch | 899 bytes | PMunn |
relationship.install.patch | 899 bytes | PMunn |
Comments
Comment #1
PMunn CreditAttribution: PMunn commentedHere is the relationship_api.inc patch.
Comment #2
PMunn CreditAttribution: PMunn commentedAnd here is the rdf_datastore.inc patch.
Comment #3
PMunn CreditAttribution: PMunn commentedOops, forgot to set it to status patch - code needs work.
Comment #4
dman CreditAttribution: dman commentedI'll assume these work, I have no clue about POSTGRES, but it hasn't broken anything.
Was there a need for any change in the install file?
Committed into CVS. Thanks.
Comment #5
dman CreditAttribution: dman commentedAs for the bug you mentioned - it arose because the ontology_foaf.rdf wasn't ready for prime-time.
It was just a direct dump from the original source. Got into my relationship distribution by accident when I was investigating if it could absorb outside formats (at all).
Turns out it could ALMOST do so, but the foaf syntax neglected to define a dc:identifier property for its items - and I require that. Bringing up the edit screens for those foaf items you'd see the gap. That gap could NOT be blank.
I've added another check into the relationship_get_term() function to ensure that at no time can terms float around without an ID of some sort.
In CVS now.
Comment #6
PMunn CreditAttribution: PMunn commentedAh ha I missed the .install patch. I'd generated it but forgot to post it. Here it is.
Comment #7
PMunn CreditAttribution: PMunn commentedOops hehe the _0 told me the story. I'd posted it at the start of the issue up top already. :-D
Comment #8
dman CreditAttribution: dman commentedDoh.
I missed it too. there should be an icon next to downloads or something :-B
I'll pop it on now...
Comment #9
(not verified) CreditAttribution: commented