Re: Incorrect comment in get_partition_dispatch_recurse
От | Tom Lane |
---|---|
Тема | Re: Incorrect comment in get_partition_dispatch_recurse |
Дата | |
Msg-id | 27511.1526566387@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Incorrect comment in get_partition_dispatch_recurse (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Incorrect comment in get_partition_dispatch_recurse
Re: Incorrect comment in get_partition_dispatch_recurse Re: Incorrect comment in get_partition_dispatch_recurse |
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> 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. > 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. 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? regards, tom lane
В списке pgsql-hackers по дате отправления: