Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Please correct me if I am misinterpreting this.
In the rdf.db.inc file, you have the following lines:
$result = db_query('SELECT DISTINCT g.uri g FROM {' . db_escape_table($table) . '} d INNER JOIN {rdf_resources} g ON d.gid = g.rid');
and
$sql = 'SELECT g.uri g, s.uri s, p.uri p, o.uri o, t.uri type, d.lang, d.data FROM {%s} d
For the first line, shouldn't g.uri g
be g.uri AS g
??
and for the second line, shouldn't g.uri g, s.uri s, p.uri p, o.uri o, t.uri type
be g.uri AS g, s.uri AS s, p.uri AS p, o.uri AS o, t.uri AS type
I believe not all sql languages assume the AS keyword.
Comments
Comment #1
scor CreditAttribution: scor commentedThat's right. For instance PostgreSQL requires AS when specifying alias names for output columns.
Comment #2
crisuskeer CreditAttribution: crisuskeer commentedI use a PostgreSQL database, and this had been bothering me for a long while until I finally discovered this thread.
"type" is a reserved word in PostgreSQL so having a column named simply "type" in the "drupal_rdf_repositories" table would appear to be riskier than it ought to be.
The PHP warnings I would get look like:
I thank scor for pointing out the easy fix by adding the 'AS' keyword.
Comment #3
smustgrave CreditAttribution: smustgrave at Mobomo commented