Hi,

I installed this module on my system which is running PostgreSQL. After using the new field I received the following error messages:

warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported LINE 1: ...(n.realname LIKE '%te%') ORDER BY n.realname ASC LIMIT 0,10 ^ HINT: Use separate LIMIT and OFFSET clauses. in /var/www/drupal/includes/database.pgsql.inc on line 139.
user warning: query: SELECT n.realname, n.uid, u.name FROM realname n INNER JOIN users u ON n.uid = u.uid WHERE (n.realname LIKE '%sie%') ORDER BY n.realname ASC LIMIT 0,10 in /var/www/drupal/sites/all/modules/realname_userreference/realname_userreference.module on line 408.
warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported LINE 1: ...realname LIKE '%test%') ORDER BY [...]

After I changed the code in line 403 from $limit_clause = ' LIMIT 0,'. $limit; to $limit_clause = ' LIMIT '. $limit; the module was working correctly.

P.S.: Are there any efforts to implement an option for a non case sensitive db query?

Comments

guillaumeduveau’s picture

Version: 6.x-1.x-dev » 6.x-1.1
Status: Fixed » Needs work

Thanks ! No need for the LIMIT 0, $limit indeed, I wonder why I added that. I'll commit that soon with other things in a new release.

For the case-insensitive search with PostgreSQL : #1061342: Non case sensitive db query with PostgreSQL

guillaumeduveau’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Status: Active » Fixed

Fixed in CVS.

guillaumeduveau’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Assigned: Unassigned » guillaumeduveau
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.