From 0a76c1e29e2401885175132adb9fc12d39cb6d15 Mon Sep 17 00:00:00 2001 From: Dan Langille Date: Sat, 15 Sep 2007 03:22:24 +0000 Subject: [PATCH] Complete the quoting experience and do this right after every connection: "set standard_conforming_strings=on" This avoid the warning: WARNING: nonstandard use of \\ in a string literal git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5574 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/postgresql.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index 4a0d2d816f..82d4e09112 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -211,6 +211,12 @@ db_open_database(JCR *jcr, B_DB *mdb) } sql_query(mdb, "SET datestyle TO 'ISO, YMD'"); + + /* tell PostgreSQL we are using standard conforming strings + and avoid warnings such as: + WARNING: nonstandard use of \\ in a string literal + */ + sql_query(mdb, "set standard_conforming_strings=on"); V(mutex); return 1; -- 2.39.5