The autocomplete sql code doesn't work with postgresql.

I hade to change line 1895 (function user_autocomplete) to:
$result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", $string, 0, 10);

Comments

Thox’s picture

PostgreSQL treats single and double quotes differently?

Cvbge’s picture

Yes, from http://www.postgresql.org/docs/7.4/interactive/sql-syntax.html :

There is a second kind of identifier: the delimited identifier or quoted identifier. It is formed by enclosing an arbitrary sequence of characters in double-quotes ("). A delimited identifier is always an identifier, never a key word.

A string constant in SQL is an arbitrary sequence of characters bounded by single quotes ('), e.g., 'This is a string'.

Zen’s picture

Status: Active » Fixed
dries’s picture

Status: Fixed » Closed (fixed)