On Wednesday 22 August 2007 13:06, Dan Langille wrote: > On 22 Aug 2007 at 10:35, BOLLENGIER Eric wrote: > > On Wednesday 22 August 2007 02:58:15 Dan Langille wrote: > > > On 21 Aug 2007 at 23:34, Eric Bollengier wrote: > > > > Hello, > > > > > > > > Yes, bacula is using PQescapeString which is an older, deprecated > > > > version of PQescapeStringConn. We have to use the new version to > > > > avoid this message, but it's not so easy at this time :) > > > > > > > > It's in my todo list. > > > > > > I'll do it. > > > > Ok, you have to modify the db_escape_string prototype > > to something like > > > > db_escape_string(B_DB *mdb, char *snew, char *old, int len) > > > > to be able to use mdb->db in PQescapeStringConn. > > I'll start this today. > > Kern: I'm thinking this does not need to be on a different branch.
By the way, I am not 100% convinced that we need to use PQescapeStringConn, though it is probably best for the long term. If I am not mistaken, the basic problem is not that PQescapeString does not work, but that what PostgreSQL wants is a string that looks like: E'string-with-escapes' and what we feed it is: 'string-with-escapes' So, the error messages can be eliminated by modifying the code slightly. The biggest problem is that the basic core code expects a char * string, and then in many different places encloses it in single quotes, and the new code needs to leave the addition of single quotes up to the lower level subroutine. Best regards, Kern ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
