public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tatsuo Ishii <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Row pattern recognition
Date: Fri, 27 Feb 2026 14:55:39 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAAe_zDaXmj9usEBFdMUvBR8Rtr4WsYW5x-CEh7B+uc0jRukuA@mail.gmail.com>
References: <CAAAe_zBx8EV3EGb9UDoWkrQhNyGoWUmEas2br3zWFPu1L6YyfQ@mail.gmail.com>
<[email protected]>
<CAAAe_zDaXmj9usEBFdMUvBR8Rtr4WsYW5x-CEh7B+uc0jRukuA@mail.gmail.com>
Hi Henson,
> The standard does not allow to use range variables, declared in the
>> FROM clause, in the DEFINE clause (19075-5 6.5). Attached patch raises
>> an error in this case.
>>
>
> Agreed. §6.5 is explicit about mutual exclusivity of the two sets of
> range variables. Your patch is correct for this case.
>
> Also, currently we do not support pattern variable range vars in the
>> DEFINE caluse (e.g. UP.price). If used, we see a confusing error
>> message:
>>
>> ERROR: missing FROM-clause entry for table "UP"
>> LINE 13: UP AS UP.price > PREV(price),
>> ^
>>
>
> Pattern variable qualified names like `UP.price` are actually valid
> standard syntax (§4.16 uses them in examples), so "is not allowed"
> is misleading ― "is not supported" would be more accurate.
Fair enough.
> To distinguish the two cases, we could expose `patternVarNames` via
> ParseState (it is already collected by `validateRPRPatternVarCount`
> before DEFINE expressions are transformed) and check in
> `transformColumnRef` whether the qualifier is a pattern variable:
Oh, I didn't realize it.
> - pattern variable qualifier → "not supported"
> - anything else → "not allowed"
>
> Would it be okay if I revise the patch along those lines?
Sure. Thanks.
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
view thread (7+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Row pattern recognition
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox