Re: Fix for seg picksplit function
| От | Alvaro Herrera |
|---|---|
| Тема | Re: Fix for seg picksplit function |
| Дата | |
| Msg-id | 1289394705-sup-7337@alvh.no-ip.org обсуждение исходный текст |
| Ответ на | Re: Fix for seg picksplit function (Yeb Havinga <yebhavinga@gmail.com>) |
| Ответы |
Re: Fix for seg picksplit function
Re: Fix for seg picksplit function |
| Список | pgsql-hackers |
Hmm, the second for loop in gseg_picksplit uses "i < maxoff" whereas the other one uses <=. The first is probably correct; if the second is also correct it merits a comment on the discrepancy (To be honest, I'd get rid of the "-1" in computing maxoff and use < in both places, given that offsets are 1-indexed). Also, the second one is using i++ to increment; probably should be OffsetNumberNext just to stay consistent with the rest of the code. The assignment to *left and *right at the end of the routine seem pretty useless (not to mention the comment talking about a routine that doesn't exist anywhere). -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: