Re: questions about how to implement a gist index

From: Riccardo Vianello <riccardo(dot)vianello(at)gmail(dot)com>
To: obartunov(at)gmail(dot)com
Cc: Teodor Sigaev <teodor(at)postgrespro(dot)ru>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: questions about how to implement a gist index
Date: 2016-06-28 15:25:27
Message-ID: CABRR7_hQq4p8origtZGvRWS4q_0yMPmRZqxt8gvWNa3cDSXHeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Oleg,

On Tue, Jun 28, 2016 at 1:05 AM, Oleg Bartunov <obartunov(at)gmail(dot)com> wrote:

> On Tue, Jun 28, 2016 at 12:44 AM, Riccardo Vianello
> <riccardo(dot)vianello(at)gmail(dot)com> wrote:
> > Could you please also help me understand the difference (if any) between
> > using the GIST_LEAF macro or the leafkey attribute of the GISTENTRY data
> > structure?
>
> Yes, this is confused.
>
> GIST_LEAF is TRUE if key is in leaf page.
>
> bool leafkey points if TRUE that key contains value from heap.
>

I think I wrongly assumed that internal and leaf nodes are homogeneously
filled with union and indexed values respectively. Is it correct that
leafkey is always TRUE for the entries that populate a leaf page, and may
be either TRUE and FALSE if GIST_LEAF is FALSE?

Thanks,
Riccardo

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Willy-Bas Loos 2016-06-28 17:14:31 cache lookup failed for index
Previous Message Oleg Bartunov 2016-06-28 15:09:41 Re: jsonb search