Variable referencing itself in example of pgbench.sgml - Mailing list pgsql-hackers

From Michael Paquier
Subject Variable referencing itself in example of pgbench.sgml
Date
Msg-id CAB7nPqQ8ARJSNyQuqrYKDMPqdLmsLidF9dK8==UoWsnEHiAHNA@mail.gmail.com
Whole thread Raw
Responses Re: Variable referencing itself in example of pgbench.sgml
List 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

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: How about to have relnamespace and relrole?
Next
From: Robert Haas
Date:
Subject: Re: "cancelling statement due to user request error" occurs but the transaction has committed.