At line 830 the query reads:

$result = db_query_range("SELECT DISTINCT(si.word) FROM {search_index} si INNER JOIN {search_total} st USING (word) WHERE si.sid = %d AND length(si.word) > %d AND si.type     = 'node' ORDER BY st.count DESC, length(si.word) DESC", $nid, variable_get('minimum_word_size', 3), 0, 6);

however, at least in PostgreSQL (but I think also in standard SQL) if SELECT DISTINT is used you should have ORDER BY attributes in SELECT attribute list

Thus I obtain the following error
pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in /home/www-data/castelnuovobga/vhproduction/drupal-6.25/includes/database.pgsql.inc

I'm providing a patch for this issue.
In my environment it works correctly and I'm tried to copy surrounding coding style, however please test it.

CommentFileSizeAuthor
relatedlinks.module.20121128.patch913 bytesgabrimonfa
Support from Acquia helps fund testing for Drupal Acquia logo