From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: WIP list rewrite |
Date: | 2004-05-24 04:28:38 |
Message-ID: | 1737.1085372918@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Neil Conway <neilc(at)samurai(dot)com> writes:
> BTW, should I take your lack of comment on linitial() as "no objection"?
Make it "no better idea" ;-)
A couple hours' poking at the patch yielded the attached two diffs
and the realization that list_difference_private cannot work, because
its first call to list_append_auto will crash due to new_list being NIL.
We had already talked about getting rid of the _auto functions, and I'd
now say that's a must not just cosmetic cleanup.
regards, tom lane
*** src/backend/nodes/list.c~ Sun May 23 23:20:34 2004
--- src/backend/nodes/list.c Sun May 23 23:56:39 2004
***************
*** 433,439 ****
if (n == list->length - 1)
return list->tail;
! for (match = list->head; --n > 0; match = match->next)
;
return match;
--- 433,439 ----
if (n == list->length - 1)
return list->tail;
! for (match = list->head; n-- > 0; match = match->next)
;
return match;
*** src/backend/optimizer/plan/createplan.c~ Sun May 23 23:20:34 2004
--- src/backend/optimizer/plan/createplan.c Mon May 24 00:19:32 2004
***************
*** 1273,1279 ****
* Now, determine which index attribute this is, change the
* indexkey operand as needed, and get the index opclass.
*/
! lfirst(newclause->args) = fix_indxqual_operand(lfirst(list_head(newclause->args)),
baserelid,
index,
&opclass);
--- 1273,1279 ----
* Now, determine which index attribute this is, change the
* indexkey operand as needed, and get the index opclass.
*/
! lfirst(list_head(newclause->args)) = fix_indxqual_operand(lfirst(list_head(newclause->args)),
baserelid,
index,
&opclass);
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2004-05-24 05:06:40 | Re: WIP list rewrite |
Previous Message | Bruno Wolff III | 2004-05-24 03:57:43 | Re: Tuple sampling |