Fixed search for PostgreSQL.