pgbench doc typos

Started by Fabien COELHOalmost 8 years ago5 messages
#1Fabien COELHO
coelho@cri.ensmp.fr
1 attachment(s)

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>
 
#2Edmund Horner
ejrh00@gmail.com
In reply to: Fabien COELHO (#1)
Re: pgbench doc typos

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

#3Fabien COELHO
coelho@cri.ensmp.fr
In reply to: Edmund Horner (#2)
Re: pgbench doc typos

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.

#4Edmund Horner
ejrh00@gmail.com
In reply to: Fabien COELHO (#3)
Re: pgbench doc typos

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.

#5Peter Eisentraut
peter.eisentraut@2ndquadrant.com
In reply to: Edmund Horner (#4)
Re: pgbench doc typos

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