From: | Vik Fearing <vik(at)postgresfriends(dot)org> |
---|---|
To: | Jacob Champion <jchampion(at)timescale(dot)com>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> |
Cc: | er(at)xs4all(dot)nl, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Row pattern recognition |
Date: | 2023-09-08 21:43:10 |
Message-ID: | 1e2a49a7-e74e-4a85-9540-16250a3b8214@postgresfriends.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Hernández | 2023-09-08 23:24:02 | Re: Possibility to disable `ALTER SYSTEM` |
Previous Message | Magnus Hagander | 2023-09-08 21:43:08 | Re: Possibility to disable `ALTER SYSTEM` |