Kevin Brown wrote: > Also, since "lower" is also ANSI-standard and supported by all three > databases, we should probably use that instead of "upper", since the > data will be more readable should we decide to store the data in > case-converted form some time in the future. So, s/upper/lower/g in > the diff (and in the functional index, of course).
Let's do this: diff --git a/dm_imaputil.c b/dm_imaputil.c --- a/dm_imaputil.c +++ b/dm_imaputil.c @@ -736,12 +736,13 @@ static GTree * _fetch_headers(const GLis r = g_list_join((GList *)ids,","); h = g_list_join((GList *)headers,"','"); + h = g_string_ascii_down(h); g_string_printf(q,"SELECT physmessage_id,headername,headervalue " "FROM %sheadervalue v " "JOIN %sheadername n ON v.headername_id=n.id " "WHERE physmessage_id IN (%s) " - "AND headername %s IN ('%s')", + "AND lower(headername) %s IN ('%s')", DBPFX, DBPFX, r->str, not?"NOT":"", h->str); g_string_free(r,TRUE); -- ________________________________________________________________ Paul Stevens mailto:[EMAIL PROTECTED] NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED] The Netherlands________________________________http://www.nfg.nl