There is a query doesn't work on postgres:
db_query("INSERT INTO {search_total} (word, count) SELECT word, LOG10(1+1/GREATEST(1, SUM(score))) FROM {search_index} GROUP BY word");
the log function is specific for mysql.. you sould use this on postgress
db_query("INSERT INTO {search_total} (word, count) SELECT word, LOG(10, CAST(1+1/GREATEST(1, SUM(score)) as numeric)) FROM {search_index} GROUP BY word");
Comments
Comment #1
Niklas Fiekas commentedFixed in 7.x-1.x. Also see #257916: Improve performance of search totals calculation for some more problems with LOG10 and GREATEST.
Edit: And comitted to 6.x-1.x.
Comment #3
waliod commentedhow to add /modify/ create tables to drupal's 7, databases