Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug
Дата
Msg-id 27602.1557633043@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-bugs
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> I looked up the spec on this point. As far as I can see, we're not
> following it, but neither does the spec do what the OP wanted; in fact
> the result should have included the _leading_ Q as well as the trailing
> one.

Huh, interesting.  So we should be translating the initial substring
to a non-greedy pattern.  I believe Spencer's engine can handle that
by sticking (?:...){1,1}? around it.

Come to think of it, we probably need to be putting (?:...) around
the trailing substring as well.  I suspect what we're doing today
produces non-spec results if "|" appears in the trailing part.

            regards, tom lane



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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug