From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: extend pgbench expressions with functions |
Date: | 2015-11-06 10:00:05 |
Message-ID: | alpine.DEB.2.10.1511060838300.11971@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
Attachment | Content-Type | Size |
---|---|---|
pgbench-expr-abs-15.patch | text/x-diff | 42.6 KB |
functions.sql | application/x-sql | 745 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Ildus Kurbangaliev | 2015-11-06 11:27:26 | Re: [PATCH] Refactoring of LWLock tranches |
Previous Message | Artur Zakirov | 2015-11-06 09:49:27 | Re: [PROPOSAL] Improvements of Hunspell dictionaries support |