Re: [PATCHES] LIKE indexing

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] LIKE indexing
Дата
Msg-id 10371.998342481@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] LIKE indexing  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> The text does seem to say that it's okay to add trailing blanks to the
>> pattern to produce a match, when the collating sequence is PAD SPACE
>> type (bpchar in our terms).

> I can't find that.

The spec says "without the appending of <space> characters to MCV",
not "without the appending of <space> characters" full stop.  I read
that to imply that it *is* okay to append spaces to the pattern PCV.
But it's not exactly transparently written in any case.

> I'm also quite suspicious about the wording "...and has the same length as
> that substring specifier."

Yeah, me too.  Does that say that space padding isn't allowed?  If so,
why the thrashing-about earlier in the sentence?  In any case, it seems
to allow a locale-dependent case conversion, for instance.


>> In any case, Hiroshi is dead right that LIKE is supposed to perform
>> collating-sequence-dependent comparison,

> As I have answered to Hiroshi, I think that would really be brain-dead.
> It would alienate LIKE from how pattern matching normally operates.

Well, you make some good arguments, but I'd like to see a fairly strong
consensus that we think the SQL definition of LIKE is broken before we
decide to build a lot of superstructure on our definition of LIKE.  So
far I haven't seen many comments on this thread...
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Status of ipcclean
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CREATEDB Where ??