Re: Improve list manipulation in several places - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Improve list manipulation in several places
Date
Msg-id 20230509080138.vz5udbsvsok7vjwl@alvherre.pgsql
Whole thread Raw
In response to Re: Improve list manipulation in several places  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On 2023-May-08, Ranier Vilela wrote:

> Em seg., 8 de mai. de 2023 às 14:26, Alvaro Herrera <alvherre@alvh.no-ip.org>
> escreveu:
> 
> > The problem I see is that each of these new functions has a single
> > caller, and the only one that looks like it could have a performance
> > advantage is list_copy_move_nth_to_head() (which is the weirdest of the
> > lot).  I'm inclined not to have any of these single-use functions unless
> > a performance case can be made for them.
> >
> I think you missed list_nth_xid, It makes perfect sense to exist.

I saw that one; it's just syntactic sugar, just like list_nth_int and
list_nth_oid, except it has only one possible callsite instead of a
dozen like those others.  I see no harm in that function, but no
practical advantage to it either.  Xid lists are a very fringe feature,
there being exactly one place in the whole server that uses them.  

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: "Drouvot, Bertrand"
Date:
Subject: Re: Add two missing tests in 035_standby_logical_decoding.pl
Next
From: Masahiko Sawada
Date:
Subject: Re: [DOC] Update ALTER SUBSCRIPTION documentation