pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Ford <ojford@gmail.com>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Add RANGE with values and exclusions clauses to the Window Functions
Date: Wed, 10 Jan 2018 02:06:18 -0500
Message-ID: <4139.1515567978@sss.pgh.pa.us> (raw )
In-Reply-To: <CAGMVOdtYSNJusckQ_9vBkMsZBQzan=Uw-Z-uYG2fD9rZ2TP7pA@mail.gmail.com >
References: <CAGMVOdu9sivPAxbNN0X+q19Sfv9edEPv=HibOJhB14TJv_RCQg@mail.gmail.com >
<b2374b9461c349b17b50c77f3a70e1a1@xs4all.nl >
<CAGMVOdsopg5ZAuJh9+ceq-s0pU2qqZsZn-jbL4A1c=h1iWaZVA@mail.gmail.com >
<CAGMVOdvrZCwJg0BngM9GMO+LK=j20vhSfdk1gTTBNNH311Vgsw@mail.gmail.com >
<bc8a1d397fa81d6ae33c297d0224184b@xs4all.nl >
<2c084c1c2bf599ceb2afa87874de8bc1@xs4all.nl >
<CAGMVOdvETRCKpeT06Uoq5RsNUOdH7d1iYy7C1Pze=L5=gBzs-Q@mail.gmail.com >
<cdbe62a6eaddae00fa770c09ed346fc0@xs4all.nl >
<CAGMVOdttRSUU3=tjgdhr902HmUVL1GLQWG0ZTVXi7OY59Xo0Xw@mail.gmail.com >
<13279.1515535159@sss.pgh.pa.us >
<CAGMVOdtYSNJusckQ_9vBkMsZBQzan=Uw-Z-uYG2fD9rZ2TP7pA@mail.gmail.com >
Oliver Ford <ojford@gmail.com> writes:
> On Tuesday, 9 January 2018, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So the approach I'm imagining now is a datatype-specific support function
>> along the lines of
>> in_range(a, b, delta) returns bool
>> Likely there are two of these, one each for the PRECEDING and FOLLOWING
>> cases.
> Would you prefer two functions, or a single function with a parameter for
> PRECEDING/FOLLOWING? Maybe:
> in_range(a, b, delta, following) returns bool
You could do it that way too. The two-function approach seems a little
cleaner and easier to document IMO, but it would create more catalog
bloat, so there's that. I don't have a strong preference.
regards, tom lane
view thread (45+ messages) latest in thread
Message-ID: <4139.1515567978@sss.pgh.pa.us>
Permalink: ../4139.1515567978@sss.pgh.pa.us/
Also on: postgresql.org/message-id/4139.1515567978@sss.pgh.pa.us
copy link · copy postgr.es
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: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, ojford@gmail.com, er@xs4all.nl
Subject: Re: Add RANGE with values and exclusions clauses to the Window Functions
In-Reply-To: <4139.1515567978@sss.pgh.pa.us>
* 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