Re: bug of pg_trgm?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bug of pg_trgm?
Дата
Msg-id 27640.1344640500@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bug of pg_trgm?  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes:
> On Thu, Aug 9, 2012 at 2:28 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm also inclined to think that we should remove *both* flag resets
>> before the second loop.  The logic here is that we are reprocessing
>> the same character seen in the last iteration of the first loop,
>> right?  So the flag state ought to remain the same.

> No. ISTM that in_wildcard_meta must be reset before the second loop.
> Because the meaning of that flag in the first loop is different from that in
> the second loop. The former and the latter indicate whether the search
> string has *heading* and *tailing* wildcard character, respectively. No?

Oh, good point.  Maybe it would be clearer to use two separate
flag variables?

The thought I'd had was that the flag would necessarily get reset
during the first iteration of the second loop, which means it all
ends up the same anyway.  But if we want to think of the flag as
meaning two different things for the two loops, I'd be inclined to
use two variables.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Doug Coleman
Дата:
Сообщение: Re: macports and brew postgresql --universal builds
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: 16-bit page checksums for 9.2