[rsyslog] Postgresql module: standard_conforming_strings
Rainer Gerhards
rgerhards at hq.adiscon.com
Fri Nov 6 16:45:33 CET 2009
> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Jonathan Bond-Caron
> Sent: Friday, November 06, 2009 4:19 PM
> To: rsyslog at lists.adiscon.com
> Subject: [rsyslog] Postgresql module: standard_conforming_strings
>
> I have two questions:
>
>
>
> 1) How does rsyslog espace SQL commands in the plugin ompgsql.c?
>
>
>
> I've been staring at the code but I can't figure out where the
> backslash
> escaping happens.
>
>
>
> My problem is I've set: standard_conforming_strings=On
>
> This means that the backslash espace ' gfgfdg \' ' is ignored and
> causes
> errors. There are many ways to fix this.
>
>
>
> a) Have rsyslog issue (SET standard_conforming_strings = off;) for
> postgresql 8.2+ (quick fix)
>
> b) Change default sql espacing to use doubles quotes '' --- so
> 'test \'
> ' becomes 'test '' '
>
> http://www.postgresql.org/docs/8.1/static/libpq-exec.html#LIBPQ-EXEC-
> ESCAPE-
> STRING
>
This is controlled via the template. For postgre SQL, I think it needs the
STDSQL option. I will check if ompgsql requests that option.
$template name,"insert ...",STDSQL
The string must be sanitized before it is passed down to the module, because
the module does not know any longer what a field is.
>
>
> 2) Is there an SVN repository of rsyslog?
No
> Or does anyone know of a
> good
> way or using GIT on windows (turtoisegit is currently buggy) ?
>
My co-workers use http://code.google.com/p/msysgit/ and don't complain (too
much ;)) about it.
HTH
Rainer
>
>
>
>
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
More information about the rsyslog
mailing list