Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Binary search in ScalarArrayOpExpr for OR'd constant arrays
Date: 2020-04-27 03:44:35
Message-ID: CAApHDvo7ACOB6PRgHDp2uNV1jr5XBn0MEu_L0y+JuRgyZU=HhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 27 Apr 2020 at 15:12, James Coleman <jtc331(at)gmail(dot)com> wrote:
> While working on this I noticed that dynahash.c line 499 has this assertion:
>
> Assert(info->entrysize >= info->keysize);
>
> Do you by any chance know why the entry would need to be larger than the key?

Larger or equal. They'd be equal if you the key was the data, since
you do need to store at least the key. Looking at the code for
examples where dynahash is used in that situation, I see
_hash_finish_split().

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2020-04-27 04:56:13 Re: proposal - plpgsql - all plpgsql auto variables should be constant
Previous Message Fujii Masao 2020-04-27 03:25:56 Re: Why are wait events not reported even though it reads/writes a timeline history file?