Re: embedded list

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)postgresql(dot)org>
Subject: Re: embedded list
Date: 2012-10-15 09:31:46
Message-ID: 201210151131.46443.andres@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, October 11, 2012 06:37:59 PM Andres Freund wrote:
> On Thursday, October 11, 2012 03:27:17 PM Andres Freund wrote:
> > On Thursday, October 11, 2012 03:23:12 PM Alvaro Herrera wrote:
> > > Alvaro Herrera escribió:
> > > > I also included two new functions in that patch, dlisti_push_head and
> > > > dlisti_push_tail. These functions are identical to dlist_push_head
> > > > and dlist_push_tail, except that they do not accept non-circular
> > > > lists. What this means is that callers that find the non-circularity
> > > > acceptable can use the regular version, and will run dlist_init() on
> > > > demand; callers that want the super-tight code can use the other
> > > > version. I didn't bother with a new dlist_is_empty.
> > >
> > > Is there any more input on this? At this point I would recommend
> > > committing this patch _without_ these dlisti functions, i.e. we will
> > > only have the functions that check for NULL-initialized dlists. We can
> > > later discuss whether to include them or not (it would be a much
> > > smaller patch and would not affect the existing functionality in any
> > > way.)
> >
> > I can live with that. I didn't have a chance to look at the newest
> > revision yet, will do that after I finish my first pass through foreign
> > key locks.
>
> I looked at and I am happy enough ;)
>
> One thing:
> I think you forgot to adjust dlist_reverse_foreach to the NULL list header.

Tom, whats your thought about Alvaro's latest version (except the "bug"
mentioned above)? It looks like a somewhat fair compromise between our
positions and I don't think the external interface needs to change if we decide
to resolve any of our differences differently.

Greetings,

Andres

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-10-15 09:34:09 Re: proposal - assign result of query to psql variable
Previous Message Dave Page 2012-10-15 08:28:13 Re: WebSphere Application Server support for postgres