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 | 32565.1557590361@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug ("Daniel Verite" <daniel@manitou-mail.org>) |
| Ответы |
Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug
|
| Список | pgsql-bugs |
"Daniel Verite" <daniel@manitou-mail.org> writes:
> Robert Schreiber wrote:
>> What appears to be happening is that the _Q? on the tail_ is being
>> matched, but _the Q is also being included in the collected data.__
> You seem to expect that % must be non-greedy and let the final Q?
> match 1 Q instead of 0, but there doesn't appear to be anything
> in the doc that supports this interpretation.
> In fact, it mentions that "%" is comparable to ".*" in POSIX
> regular expressions, and the latter _is_ greedy.
Right. You could get the behavior you want using a non-greedy quantifier,
but you'd have to use the POSIX regexp functions, not substring().
regards, tom lane
В списке pgsql-bugs по дате отправления: