OSDN Git Service

At the head of wchareq, length of (multibyte) character is compared by
authorBruce Momjian <bruce@momjian.us>
Wed, 25 May 2005 22:59:33 +0000 (22:59 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 25 May 2005 22:59:33 +0000 (22:59 +0000)
commit8c792fe9cbe1dcfdafcdc70b961be714631324ec
treed9a4e8a4c5848634e4e5fe86db831f2a0d44af45
parentbbb586ff211c2d304db4a64e8c3ea715a4ecebb5
At the head of wchareq, length of (multibyte) character is compared by
using pg_mblen. Therefore, pg_mblen is executed many times, and it
becomes a bottleneck.

This patch makes a short cut, and reduces execution frequency of
pg_mblen by comparing the first byte first.

a_ogawa
src/backend/utils/adt/like.c