Re: Incorrect comment in get_partition_dispatch_recurse

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: Incorrect comment in get_partition_dispatch_recurse
Date: 2018-05-17 14:36:30
Message-ID: CA+HiwqHCL+oqOLpvDFuQUMdJSjSApZ_4W2m0zPz6XYo61AcT-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 17, 2018 at 10:29 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Unless the indexing system actually can't reference the first element
> of *pds, and -1 means the second element. But then I think we need a
> more verbose explanation here.

First element in *pds list (and the array subsequently created from
it) contains the root table's entry. So, a -1 does mean the 2nd entry
in that list/array. A 0 in the indexes array always refers to a leaf
partition and hence an index into the array for leaf partitions.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-17 15:22:45 Re: NaNs in numeric_power (was Re: Postgres 11 release notes)
Previous Message Robert Haas 2018-05-17 14:24:28 Re: Should we add GUCs to allow partition pruning to be disabled?