pgbench doc typos
Attached patch fixes two very minor typos in pgbench recently added
documentations:
- one about the mod() function
- two about the hash() function
--
Fabien.
Attachments:
pgbench-doc-typo-1.patchtext/plain; name=pgbench-doc-typo-1.patchDownload
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml
index 41d9030..e4b37dd 100644
--- a/doc/src/sgml/ref/pgbench.sgml
+++ b/doc/src/sgml/ref/pgbench.sgml
@@ -1350,7 +1350,7 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
<entry><literal>1.0</literal></entry>
</row>
<row>
- <entry><literal><function>mod(<replaceable>i</replaceable>, <replaceable>bj</replaceable>)</function></literal></entry>
+ <entry><literal><function>mod(<replaceable>i</replaceable>, <replaceable>j</replaceable>)</function></literal></entry>
<entry>integer</entry>
<entry>modulo</entry>
<entry><literal>mod(54, 32)</literal></entry>
@@ -1526,8 +1526,8 @@ f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) /
with each other and this is when implicit seed parameter comes in handy:
<programlisting>
-\set k1 abs(hash(:r), :default_seed + 123) % 1000000
-\set k2 abs(hash(:r), :default_seed + 321) % 1000000
+\set k1 abs(hash(:r, :default_seed + 123)) % 1000000
+\set k2 abs(hash(:r, :default_seed + 321)) % 1000000
</programlisting>
</para>
I did a quick review of this.
The patch is just a doc typo fix and it applies cleanly to master (as of this email). I was able to build the docs, and they look ok.
Fixing the abs/hash bracketing seems clear. The wasn't sure about rewriting "mod(i, bj)" as "mod(i, j)", because there could be some convention about parameter names, but I can't think of anything the "b" could be in the case of mod.
Edmund
Hello Edmund,
Thanks for the check. You might consider turning the patch as ready in the
cf app.
Fixing the abs/hash bracketing seems clear. The wasn't sure about
rewriting "mod(i, bj)" as "mod(i, j)", because there could be some
convention about parameter names, but I can't think of anything the "b"
could be in the case of mod.
Might be a left-over a previous version which might have used MOD(a, b),
but a/b are rather used for fp numbers and i/j for integers.
--
Fabien.
On 30 March 2018 at 19:26, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
Thanks for the check. You might consider turning the patch as ready in the
cf app.
Ok, I have done so, since the patch is small and simple.
Fixing the abs/hash bracketing seems clear. The wasn't sure about
rewriting "mod(i, bj)" as "mod(i, j)", because there could be some
convention about parameter names, but I can't think of anything the "b"
could be in the case of mod.Might be a left-over a previous version which might have used MOD(a, b), but
a/b are rather used for fp numbers and i/j for integers.
Ah that seems possible.
On 3/30/18 03:30, Edmund Horner wrote:
On 30 March 2018 at 19:26, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
Thanks for the check. You might consider turning the patch as ready in the
cf app.Ok, I have done so, since the patch is small and simple.
Fixing the abs/hash bracketing seems clear. The wasn't sure about
rewriting "mod(i, bj)" as "mod(i, j)", because there could be some
convention about parameter names, but I can't think of anything the "b"
could be in the case of mod.Might be a left-over a previous version which might have used MOD(a, b), but
a/b are rather used for fp numbers and i/j for integers.Ah that seems possible.
committed
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services