Re: like/ilike improvements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: like/ilike improvements
Date: 2007-05-23 16:07:10
Message-ID: 21418.1179936430@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I am also wondering if it might be sensible to make this choice once at
> backend startup and store a function pointer, instead of doing it for
> every string processed by like/ilike:

> if (pg_database_encoding_max_length() == 1)
> return SB_MatchText(s, slen, p, plen);
> else if (GetDatabaseEncoding() == PG_UTF8)
> return UTF8_MatchText(s, slen, p, plen);
> else
> return MB_MatchText(s, slen, p, plen);

> I guess that might make matters harder if we ever got per-column encodings.

Yeah. It's not saving much anyway ... I wouldn't bother.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2007-05-23 17:55:12 Re: [GSOC] - I ntegrity check algorithm for data files
Previous Message Andrew Dunstan 2007-05-23 16:00:54 Re: like/ilike improvements

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-05-24 00:36:17 Re: like/ilike improvements
Previous Message Andrew Dunstan 2007-05-23 16:00:54 Re: like/ilike improvements