From: Vik Fearing <vik@postgresfriends.org>
To: Tatsuo Ishii <ishii@postgresql.org>
To: david.g.johnston@gmail.com
Cc: jacob.champion@enterprisedb.com
Cc: pgsql-hackers@postgresql.org
Cc: er@xs4all.nl
Cc: peter@eisentraut.org
Subject: Re: Row pattern recognition
Date: Tue, 22 Oct 2024 16:12:43 +0300
Message-ID: <a13e5b7d-c131-44b3-9d2a-2c57d22a8251@postgresfriends.org> (raw)
In-Reply-To: <20241022.191909.2043328908414791518.ishii@postgresql.org>
References: <CAOYmi+mkLEsVBnLS53Je4g4knFo9DFHrESes8VL8CjZAUMwMvg@mail.gmail.com>
<20241022.135343.842876007254579242.ishii@postgresql.org>
<CAKFQuwatcdJaTz-TndQtc21JhgVzOCtZuatSAxD=cpnBLY1L+w@mail.gmail.com>
<20241022.191909.2043328908414791518.ishii@postgresql.org>
On 22/10/2024 12:19, Tatsuo Ishii wrote:
> Acording to ISO/IEC 9075-2:2016 "4.21.2 Row pattern navigation operations",
>
> <row pattern navigation operation> evaluates a <value expression> VE
> in a row NR, which may be different than current row CR.
>
> From this I think PREV(col + 1) should be interpreted as:
>
> 1. go to the previous row.
> 2. evaluate "col + 1" at the current row (that was previous row).
> 3. return the result.
>
> If my understanding is correct, prev(price + 1) has the same meaning
> as prev(price) + 1.
This is how I read the specification also.
--
Vik Fearing
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: vik@postgresfriends.org, ishii@postgresql.org, david.g.johnston@gmail.com, jacob.champion@enterprisedb.com, er@xs4all.nl, peter@eisentraut.org
Subject: Re: Row pattern recognition
In-Reply-To: <a13e5b7d-c131-44b3-9d2a-2c57d22a8251@postgresfriends.org>
References: <CAOYmi+mkLEsVBnLS53Je4g4knFo9DFHrESes8VL8CjZAUMwMvg@mail.gmail.com> <20241022.135343.842876007254579242.ishii@postgresql.org> <CAKFQuwatcdJaTz-TndQtc21JhgVzOCtZuatSAxD=cpnBLY1L+w@mail.gmail.com> <20241022.191909.2043328908414791518.ishii@postgresql.org> <a13e5b7d-c131-44b3-9d2a-2c57d22a8251@postgresfriends.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox