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: Sat, 27 Jan 2018 11:14:53 -0500
Message-ID: <27788.1517069693@sss.pgh.pa.us> (raw )
In-Reply-To: <CAGMVOdtGe=30u6D2WqwvWchE+-yNb9jKnEeG8BHyw7jHiGPR7w@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 >
<4139.1515567978@sss.pgh.pa.us >
<CAGMVOdvJMfOzm0v4psCoAaVGfCbdFwNKzaSEhfTj8rE9UCz-eQ@mail.gmail.com >
<c30e6457a6de09d26425af997f71996e@xs4all.nl >
<CAGMVOdtGe=30u6D2WqwvWchE+-yNb9jKnEeG8BHyw7jHiGPR7w@mail.gmail.com >
Oliver Ford <ojford@gmail.com> writes:
> On Sat, Jan 27, 2018 at 7:40 AM, Erik Rijkers <er@xs4all.nl> wrote:
>> Regression tests only succeed for assert-disabled compiles; they fail when
>> assert-enabled:
> Problem seems to be with an existing Assert in catcache.c:1545:
> Assert(nkeys > 0 && nkeys < cache->cc_nkeys);
> The "<" needs to be "<=" (and is changed in the attached patch).
No, that Assert is correct, because it's in SearchCatCacheList.
It doesn't make any sense to use SearchCatCacheList for a lookup
that specifies all of the key columns, because then you necessarily
have at most one match; you might as well use regular SearchCatCache,
which is significantly more efficient.
> AFAICT this was never a problem before purely because no code before
> this patch called SearchSysCacheList4, so they always called with
> fewer keys than the number available.
Hm, probably we shouldn't even have that macro.
regards, tom lane
view thread (45+ messages) latest in thread
Message-ID: <27788.1517069693@sss.pgh.pa.us>
Permalink: ../27788.1517069693@sss.pgh.pa.us/
Also on: postgresql.org/message-id/27788.1517069693@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: <27788.1517069693@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