The query:

INSERT INTO {location_instance_tmp} (nid, vid, genid, lid) SELECT nid, vid, l.genid, l.lid FROM {node} n JOIN (SELECT SUBSTRING_INDEX(genid, ':', -1) as genvid, lid, genid FROM {location_instance}) as l ON n.vid = l.genvid

in file location_cck.install is not Postgresql compatible becouse:

  • function SUBSTRING_INDEX is uknown to PostgreSql
  • also, after fixing previous point by adding manually the SUBSTRING_INDEX function to the database, n.vid = l.genvid raise an error becouse it seems Postgres cannot compare directly numbers to string
  • another point, but couldn't test it by now, i think that all select fields in a join should specify the table, and should not be implicit (ex. SELECT nid, vid should be SELECT n.nid, n.vid)

I'm trying to make it compatible, but is quite a complex query and I'm not too expert in sql.
If someone can help, it would be really appreciated, many thanks!!

Comments

podarok’s picture

Version: 6.x-3.1 » 6.x-3.x-dev
Priority: Critical » Major

not critical

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing old D6 issues as D6 is end of life