Re: PATCH: pgbench allow '=' in \set

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: pgbench allow '=' in \set
Date: 2015-05-13 19:54:40
Message-ID: alpine.DEB.2.10.1505132136180.31924@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-05-13 20:05:54 Re: Proposal : REINDEX xxx VERBOSE
Previous Message Robert Haas 2015-05-13 19:53:53 Re: Proposal : REINDEX xxx VERBOSE