Re: Variable referencing itself in example of pgbench.sgml

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Variable referencing itself in example of pgbench.sgml
Date: 2015-03-19 12:18:45
Message-ID: CA+TgmoZpLEa=OmjW=m4o+mEL9u0Q5H3kxukGyoCZ_odnVRC_KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 19, 2015 at 7:20 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> 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.

There's no special prohibition against that. It works fine if aid is
already set.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2015-03-19 12:50:09 Re: ERRCODE_T_R_DEADLOCK_DETECTED
Previous Message Alvaro Herrera 2015-03-19 12:16:07 Re: proposal: searching in array function - array_position