Re: Syslog Facility Patch

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Syslog Facility Patch
Дата
Msg-id Pine.LNX.4.21.0011151954510.779-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Syslog Facility Patch  (Larry Rosenman <ler@lerctr.org>)
Ответы Re: Syslog Facility Patch  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-hackers
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/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: RE: [COMMITTERS] pgsql/src/backend/access/transam ( xact.c xlog.c)
Следующее
От: Don Baccus
Дата:
Сообщение: Re: Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL