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.1511060838300.11971@sto
Whole thread Raw
In response to Re: extend pgbench expressions with functions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: extend pgbench expressions with functions
List pgsql-hackers
> Those can be avoided in other ways.  For example:

Ok, ok, I surrender:-)

Here is a v15 which hides conversions and assignment details in macros and 
factors out type testing of overloaded operators so that the code 
expansion is minimal (basically the operator evaluation is duplicated for 
int & double, but the rest is written once). The evaluation cost is 
probably slightly higher than the previous version because of the many 
hidden type tests.

Note that variables are only int stored as text. Another patch may try to 
propagate the value structure for variables, but then it changes the query 
expansion code, it is more or less orthogonal to add functions. Moreover 
double variables would not be really useful anyway.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Artur Zakirov
Date:
Subject: Re: [PROPOSAL] Improvements of Hunspell dictionaries support
Next
From: Ildus Kurbangaliev
Date:
Subject: Re: [PATCH] Refactoring of LWLock tranches