PATCH: pgbench allow '=' in \set - Mailing list pgsql-hackers

From Fabien COELHO
Subject PATCH: pgbench allow '=' in \set
Date
Msg-id alpine.DEB.2.10.1505072009310.20788@sto
Whole thread Raw
Responses Re: PATCH: pgbench allow '=' in \set  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: PATCH: pgbench allow '=' in \set  (Robert Haas <robertmhaas@gmail.com>)
List 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.

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT error messages
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT error messages