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

From Fabien COELHO
Subject Re: PATCH: pgbench allow '=' in \set
Date
Msg-id alpine.DEB.2.10.1505132136180.31924@sto
Whole thread Raw
In response to Re: PATCH: pgbench allow '=' in \set  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: PATCH: pgbench allow '=' in \set
List pgsql-hackers

> I also don't like to restate what has already been said.  \set at the
> beginning of the line tells you that you will be setting a variable.
> Adding = or := only restates the same thing.  I agree it superficially
> looks a little nicer, but I'm not sure it's really going to add
> clarity, because it's basically just redundant.

Ok. I've marked this one as REJECTED.


Otherwise, I was considering this kind of things:
  n := expr

If we have functions, that could include:
  n := random(1, 100)

with more work (handling of double constants):
  n := exprandom(1, 100, 3.5)

and maybe:
  n := SELECT ...

or even:
  n, m, p, q := SELECT ...

Also, having ";" as a end of commands could also help by allowing 
multiline commands, but that would break compatibility. Maybe allowing 
continuations (\\\n) would be an acceptable compromise.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposal : REINDEX xxx VERBOSE
Next
From: Alvaro Herrera
Date:
Subject: Re: Proposal : REINDEX xxx VERBOSE