Variable referencing itself in example of pgbench.sgml

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Variable referencing itself in example of pgbench.sgml
Date: 2015-03-19 11:20:42
Message-ID: CAB7nPqQ8ARJSNyQuqrYKDMPqdLmsLidF9dK8==UoWsnEHiAHNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

While looking at some recent commit related to pgbench I noticed this
example in the docs:
\set aid (1021 * :aid) % (100000 * :scale) + 1
This actually would fail because aid references itself.

Attached is a patch to change this example as follows:
-\set aid (1021 * :aid) % (100000 * :scale) + 1
+\set aid (1021 * :ntellers) % (100000 * :scale) + 1
Regards,
--
Michael

Attachment Content-Type Size
20150319_pgbench_docfix.patch text/x-diff 485 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-03-19 11:54:02 Re: "cancelling statement due to user request error" occurs but the transaction has committed.
Previous Message Kyotaro HORIGUCHI 2015-03-19 11:04:03 Re: How about to have relnamespace and relrole?