PATCH: pgbench allow '=' in \set

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: PATCH: pgbench allow '=' in \set
Date: 2015-05-07 18:18:16
Message-ID: alpine.DEB.2.10.1505072009310.20788@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello devs,

Since an expression syntax has been added to pgbench, I find that the
readability of expressions is not great. An extra '=' improves the
situation for me:

\set id = 1 + abs((:id * 1021) % (100000 * :scale))

seems slightly better than:

\set id 1 + abs((:id * 1021) % (100000 * :scale))

But that is debatable!

The attached patch just ignores a leading '=' in a pgbench expression.

--
Fabien.

Attachment Content-Type Size
pgbench-assign-1.patch text/x-diff 2.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-05-07 18:18:37 Re: INSERT ... ON CONFLICT error messages
Previous Message Peter Geoghegan 2015-05-07 18:16:12 Re: INSERT ... ON CONFLICT error messages