Re: Syslog Facility Patch

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Syslog Facility Patch
Date: 2000-11-15 19:15:09
Message-ID: Pine.LNX.4.21.0011151954510.779-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-11-15 19:15:59 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Previous Message Don Baccus 2000-11-15 19:09:06 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL