Search Postgresql Archives

how to reference variables in pgbench custom scripts?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm attempting to write a custom pgbench script (called via the -f
option), with a variable set at the top with:
\setrandom aid 100 50875000

However, I can't quite figure out how to reference the new aid
variable.  The documentation simply states that a variable is
referenced with a colon in front of its name (:aid ).  However, I
can't figure out how to make this work if the variable is embedded
between other characters.  For example, I want to do something like
this:

CREATE INDEX nppsmoke_tmp_:aid_idx ON nppsmoke_tmp_:aid (testname);

However, when I run pgbench, it fails:
Client 0 aborted in state 4: ERROR:  syntax error at or near ":"
LINE 1: CREATE INDEX nppsmoke_tmp_:aid_idx ON nppsmoke_tmp_29954053 ...

Is there a default delimiter, such as bash's curly brackets (${aid}) ?

thanks


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux