diff -r -U5 cck/includes/views/handlers/content_plugin_display_simple.inc cck.new/includes/views/handlers/content_plugin_display_simple.inc
--- cck/includes/views/handlers/content_plugin_display_simple.inc	2009-06-24 01:19:12.000000000 +1200
+++ cck.new/includes/views/handlers/content_plugin_display_simple.inc	2010-06-09 15:08:13.000000000 +1200
@@ -22,14 +22,15 @@
 class content_plugin_display_references extends content_plugin_display_simple {
   function query() {
     $options = $this->get_option('content_options');
 
     if ($options['string'] !== '') {
+      $like = $GLOBALS["db_type"] == 'pgsql' ? "ILIKE" : "LIKE";
       $match_clauses = array(
-        'contains' => "LIKE '%%%s%%'",
+        'contains' => "$like '%%%s%%'",
         'equals' => "= '%s'",
-        'starts_with' => "LIKE '%s%%'",
+        'starts_with' => "$like '%s%%'",
       );
       $clause = isset($match_clauses[$options['match']]) ? $match_clauses[$options['match']] : $match_clauses['contains'];
       $alias = $this->view->query->ensure_table($options['table']);
       $this->view->query->add_where(NULL, "$alias.$options[field_string] $clause", $options['string']);
     }
diff -r -U5 cck/modules/nodereference/nodereference.module cck.new/modules/nodereference/nodereference.module
--- cck/modules/nodereference/nodereference.module	2009-08-27 05:29:58.000000000 +1200
+++ cck.new/modules/nodereference/nodereference.module	2010-06-09 15:05:05.000000000 +1200
@@ -876,14 +876,15 @@
   if (!count($related_types)) {
     return array();
   }
 
   if ($string !== '') {
+    $like = $GLOBALS["db_type"] == 'pgsql' ? "ILIKE" : "LIKE";
     $match_operators = array(
-      'contains' => "LIKE '%%%s%%'",
+      'contains' => "$like '%%%s%%'",
       'equals' => "= '%s'",
-      'starts_with' => "LIKE '%s%%'",
+      'starts_with' => "$like '%s%%'",
     );
     $where[] = 'n.title '. (isset($match_operators[$match]) ? $match_operators[$match] : $match_operators['contains']);
     $args[] = $string;
   }
   elseif ($ids) {
diff -r -U5 cck/modules/userreference/userreference.module cck.new/modules/userreference/userreference.module
--- cck/modules/userreference/userreference.module	2009-09-23 12:07:32.000000000 +1200
+++ cck.new/modules/userreference/userreference.module	2010-06-09 15:07:14.000000000 +1200
@@ -774,14 +774,15 @@
   $where = array();
   $args = array();
   $join = array();
 
   if ($string !== '') {
+    $like = $GLOBALS["db_type"] == 'pgsql' ? "ILIKE" : "LIKE";
     $match_operators = array(
-      'contains' => "LIKE '%%%s%%'",
+      'contains' => "$like '%%%s%%'",
       'equals' => "= '%s'",
-      'starts_with' => "LIKE '%s%%'",
+      'starts_with' => "$like '%s%%'",
     );
     $where[] = 'u.name '. (isset($match_operators[$match]) ? $match_operators[$match] : $match_operators['contains']);
     $args[] = $string;
   }
   elseif ($ids) {
