Re: extend pgbench expressions with functions - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: extend pgbench expressions with functions
Date
Msg-id alpine.DEB.2.10.1602121054140.3116@sto
Whole thread Raw
In response to Re: extend pgbench expressions with functions  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: extend pgbench expressions with functions
List pgsql-hackers
Hello Michaël,

> Using a pointer to the tail of the list would make the code simple,
> and save a couple of lines.

I did that, see v27 attached.

Note that it does not save any lines, because the reverse function is 
removed, but then you need another type to keep the head & tail, the link 
type is not enough, and then you have to manage that stuff in the code. 
Whether it is "simpler" is debatable. It probably costs more tests when 
executed.

However, it really saves having to answer the question "why is the list 
reversed?", which is definitely a win from my point of view:-)

> Another thing that could be considered is also to move list.c [...]

I think that this option is too much bother for the small internal purpose 
at hand.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [COMMITTERS] pgsql: Code cleanup in the wake of recent LWLock refactoring.
Next
From: Yury Zhuravlev
Date:
Subject: Re: GinPageIs* don't actually return a boolean