[syslog-ng]template_escape character not valid for oracle

Matt Scifo syslog-ng@lists.balabit.hu
27 Aug 2003 09:24:55 -0700


Thanks.  I found it.


On Wed, 2003-08-27 at 04:42, Balazs Scheidler wrote:
> On Tue, Aug 26, 2003 at 12:40:34PM -0700, Matt Scifo wrote:
> > Hello
> > 
> > I just started using syslog-ng with an oracle database as my
> > destination.  I have discovered that Oracle does not accept a backslash
> > as an escape character (I thought backslash was a standard).
> > 
> > The following query does not work in Oracle...
> > 
> > INSERT INTO messages (ID, TIMESTAMP, HOST ,FACILITY, PRIORITY, TAG,
> > PROGRAM, MESSAGE) VALUES ('', to_date('2003-08-26 11:51:00', 'yyyy-mm-dd
> > hh24:mi:ss'), 'host1', 'local0', 'warning', '84', '1', 'STOP:
> > \'edrasmu\' message')
> > 
> > It will only accept a single quote for escaping a single quote...
> > 
> > INSERT INTO messages (ID, TIMESTAMP, HOST ,FACILITY, PRIORITY, TAG,
> > PROGRAM, MESSAGE) VALUES ('', to_date('2003-08-26 11:51:00', 'yyyy-mm-dd
> > hh24:mi:ss'), 'host1', 'local0', 'warning', '84', '1', 'STOP:
> > ''edrasmu'' message')
> > 
> > How hard would it be to change the escape character that syslog-ng is
> > looking for, or even better, make a template_escape(string) option which
> > accepts a custom escape string?  Where is the code that handles the
> > escaping of characters located in the source?
> 
> you are looking for macros.c, append_string function, currently the escaping
> via '\' is absolutely wired in.