Re: Incorrect comment in get_partition_dispatch_recurse

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: Incorrect comment in get_partition_dispatch_recurse
Дата
в 23:03:37
Msg-id
20180517200337.dclqyowwpw4c3tzj@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
Incorrect comment in get_partition_dispatch_recurse David Rowley <david.rowley@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Robert Haas <robertmhaas@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse David Rowley <david.rowley@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Incorrect comment in get_partition_dispatch_recurse David Rowley <david.rowley@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Robert Haas <robertmhaas@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse Robert Haas <robertmhaas@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse Tom Lane <tgl@sss.pgh.pa.us>
Re: Incorrect comment in get_partition_dispatch_recurse Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Robert Haas <robertmhaas@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse David Rowley <david.rowley@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Incorrect comment in get_partition_dispatch_recurse Amit Langote <amitlangote09@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse Robert Haas <robertmhaas@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse David Rowley <david.rowley@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Incorrect comment in get_partition_dispatch_recurse Robert Haas <robertmhaas@gmail.com>
Re: Incorrect comment in get_partition_dispatch_recurse Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: Incorrect comment in get_partition_dispatch_recurse David Rowley <david.rowley@2ndquadrant.com>
Re: Incorrect comment in get_partition_dispatch_recurse Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
On 2018-May-17, Tom Lane wrote:

> Robert Haas  writes:
> > Hang on, I can't be wrong (famous last words).  If the negative
> > indexes were 0-based, that would mean that the first element of the
> > list was referenced by -0, which obviously can't be true, because 0 =
> > -0.  In other words, we can't be using 0-based indexing for both the
> > positive and the negative values, because then 0 itself would be
> > ambiguous.  It's got to be that -1 is the first element of the *pds
> > list, which means -- AFAICS, anyway -- that the way I phrased it is
> > correct.

> Maybe what you need is a redesign.  This convention seems impossibly
> confusing and hence error-prone.  What about using a separate bool to
> indicate which list the index refers to?

That was my impression I first came across this, FWIW, and I confess I
didn't try hard enough to understand it fully.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Peter Eisentraut
Дата:
Сообщение: Re: Odd procedure resolution
FAQ