Andrew Dunstan <andrew@dunslane.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