On Fri, Jun 15, 2012 at 08:28:04PM +0200, Miroslav Suchý wrote: > If you look at commit: > d8744d1693c1fc6e231278dd9a6537f269371192 > and the code: > > + if self.blob_map: > + for blob_var in self.blob_map.keys(): > + kw[blob_var] = kw[blob_var].replace('\\', '\\\\') > > This worked fine in default Pg till version 9.0, but the behavior > depends on server side setting of option standard_conforming_strings > (boolean): > http://www.postgresql.org/docs/9.1/static/runtime-config-compatible.html > > and this option changed its default value in 9.1. Which caused that > this statement corrupts data if \<char> appears in blob. > > Why we could not use ordinary prepare here?
That would break existing 8.4-based installations, wouldn't it? Do we have a way to hardcode setting the option upon connect so that we know it behaves the way we assume even on older versions? -- Jan Pazdziora Principal Software Engineer, Satellite Engineering, Red Hat _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel