Re: linked list rewrite - Mailing list pgsql-hackers

From Neil Conway
Subject Re: linked list rewrite
Date
Msg-id D0669FFC-9734-11D8-B054-000A95AB279E@samurai.com
Whole thread Raw
In response to Re: linked list rewrite  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: linked list rewrite  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
(To resurrect an old thread, I've finally got some time to devote to 
this; I'll post a patch once I've got something ready for public 
consumption.)

On 23-Mar-04, at 4:59 PM, Tom Lane wrote:
> Let's see ... fleshing out this idea a bit, here's a rundown of all the
> symbols in pg_list.h and suggested new names: [...]

Most of your suggestions are agreeable; a few minor quibbles follow.

> lfirstcell    new function to get first cell, or NULL if none
[...]
> llastnode    llastcell

What do you think of list_head() and list_tail() instead?

> set_union    list_union
> set_ptrUnion    list_union_ptr
>         list_union_int        not currently used
> set_uniono    list_union_oid

I don't see the need for anything more than set_difference() and 
set_difference_ptr() -- if we're passed a T_IntList or a T_OidList, we 
can examine the list tag and do the Right Thing automagically. ISTM we 
only need the xxx_int() and xxx_oid() variants when something in the 
function's signature depends on the type of the list's elements.

> set_difference    list_difference
> set_ptrDifference  list_difference_ptr
>         list_difference_int    not currently used
> set_differenceo    list_difference_oid

Ibid.

-Neil



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: No threading option for FreeBSD 4.X in 7.5
Next
From: Dennis Bjorklund
Date:
Subject: Re: Bringing PostgreSQL torwards the standard regarding