Larry Rosenman writes:
> > syntax is lexically compatible with the syntax of the SET command.
> > Therefore you can't have "funny" characters in 'value' unless
> > single-quoted.
> I added period(.), hyphen(-), and underscore(_).
Probably '/' and ':' as well, for krb_server_keyfile.
> ! UNQUOTED_STRING {LETTER}({LETTER_OR_DIGIT}|[-._])*
> ! STRING (\'|\")([^'"\n]|\\.)*(\'|\")
That will accept strings that start with one kind of quote and end with
another. Please stick to single-quotes only, unless you want to make a
case for the double-quotes.
I'm also not quite sure about
> + if (s[i] == '\'')
> + {
> +
> + /*
> + * Note: if scanner is working right, unescaped quotes can
> + * only appear in pairs, so there should be another character.
> + */
> + i++;
> + newStr[j] = s[i];
> + }
The SQL scanner accepts 'foo''bar' as the SQL-approved method of escaping
quotes in quotes. GUC doesn't do that (way too complicated for now), so
this probably needs to be adjusted.
Other than that, looks good.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/