Re: pgbench failed when -f option contains a char '@'

2020-12-20 Thread Tom Lane
Fabien COELHO writes: > The "parser" looks for the last @ in the argument, so the simple > workaround is to append "@1". > I suggest the attached doc update, or anything in better English. Agreed, done. regards, tom lane

Re: pgbench failed when -f option contains a char '@'

2020-12-20 Thread Fabien COELHO
Hello Tom, I think we should just leave this as it is. The user can simply rename the file. Yeah. The assumption when we defined the script-weight syntax was that there's no particular reason to use "@" in a script file name, and I don't see why that's a bad assumption. The "parser" looks

Re: pgbench failed when -f option contains a char '@'

2020-12-20 Thread Fabien COELHO
Hello, pgbench use -f filename[@weight] to receive a sql script file with a weight, ISTM that I thought of this: "pgbench -f filen@me@1" does work. sh> touch foo@bla sh> pgbench -f foo@bla@1 pgbench: fatal: empty command list for script "foo@bla" The documentation could point this ou

Re: pgbench failed when -f option contains a char '@'

2020-12-18 Thread Tom Lane
Heikki Linnakangas writes: > I think we should just leave this as it is. The user can simply rename > the file. Yeah. The assumption when we defined the script-weight syntax was that there's no particular reason to use "@" in a script file name, and I don't see why that's a bad assumption. > O

Re: pgbench failed when -f option contains a char '@'

2020-12-18 Thread Heikki Linnakangas
On 18/12/2020 08:22, Wang, Shenhao wrote: Hi, hackers pgbench use -f filename[@weight] to receive a sql script file with a weight, but if I create a file contains char'@', like a...@2.sql, specify this file without weigth, pgbench will failed with error: pgbench: fatal: invalid weight s