Re: pgbench failed when -f option contains a char '@' - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgbench failed when -f option contains a char '@'
Date
Msg-id 157895.1608304242@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgbench failed when -f option contains a char '@'  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: pgbench failed when -f option contains a char '@'
List pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> 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.

> Or maybe one change would be worthwhile here: First check if the part 
> after the @ contains only digits. If doesn't, then assume it's part of 
> the filename rather than a weight. That would fix this for cases like 
> "foo@1.sql", although not for "foo@1".

I do not like introducing ambiguity of that sort.  Not being entirely
clear on which script file is going to be read seems like a recipe
for security issues.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Proposed patch for key managment
Next
From: Bruce Momjian
Date:
Subject: Re: Proposed patch for key managment