Re: pgbench and timestamps - Mailing list pgsql-general

From Tom Lane
Subject Re: pgbench and timestamps
Date
Msg-id 2203820.1593008123@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgbench and timestamps  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: pgbench and timestamps
List pgsql-general
David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 24 Jun 2020 at 20:41, Jaime Soler <jaime.soler@gmail.com> wrote:
>> I don't know why pgbench use  timestamp: «2006-03-01 00$1$2» instead of timestamp '2006-03-01 00:00:00'

> I've not debugged it, but it looks like pgbench thinks that :00 is a
> pgbench variable and is replacing each instance with a query
> parameter.

Yeah.

> I don't often do much with pgbench and variables, but there are a few
> things that surprise me here.

> 1) That pgbench replaces variables within single quotes, and;
> 2) that we still think it's a variable name when it starts with a digit, and;
> 3) We replace variables that are undefined.

Also (4) this only happens when in non-simple query mode --- the
example works fine without "-M prepared".

I can think of use-cases for substituting variables inside quotes,
so maybe (1) isn't a bug; but it sure seems like (3) and (4) are.

In any case, the documentation about this seems pretty inadequate.

            regards, tom lane



pgsql-general by date:

Previous
From: "Daniel Verite"
Date:
Subject: RE: autovacuum failing on pg_largeobject and disk usage of the pg_largeobject growing unchecked
Next
From: "Jim Hurne"
Date:
Subject: RE: autovacuum failing on pg_largeobject and disk usage of the pg_largeobject growing unchecked