Re: Row pattern recognition

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Row pattern recognition
Дата
Msg-id 1e2a49a7-e74e-4a85-9540-16250a3b8214@postgresfriends.org
обсуждение исходный текст
Ответ на Re: Row pattern recognition  (Jacob Champion <jchampion@timescale.com>)
Список pgsql-hackers
On 9/8/23 21:27, Jacob Champion wrote:
> On 9/7/23 20:54, Tatsuo Ishii wrote:

>>> But it's easy
>>> to come up with a pattern where that's the wrong order, like
>>>
>>>      PATTERN ( A+ (B|A)+ )
>>>
>>> Now "aaa" will be considered before "aab", which isn't correct.
>>
>> Can you explain a little bit more? I think 'aaa' matches a regular
>> expression 'a+(b|a)+' and should be no problem before "aab" is
>> considered.
> 
> Assuming I've understood the rules correctly, we're not allowed to
> classify the last row as 'A' if it also matches 'B'. Lexicographic
> ordering takes precedence, so we have to try "aab" first. Otherwise our
> query could return different results compared to another implementation.


Your understanding is correct.
-- 
Vik Fearing




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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`
Следующее
От: Álvaro Hernández
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`