On Mon, 23 Aug 2010 08:06:49 +0200
Alban Hertroys <dal...@solfertje.student.utwente.nl> wrote:


> This is almost certainly due to the user having changed the PostgreSQL 
> setting 'standard_conforming_strings' to 'on'. Admittedly that would be the 
> preferable way to interpret strings, but it's not the default (compatibility 
> reasons mostly).
> 
> dspam=> SHOW standard_conforming_strings ;
>  standard_conforming_strings 
> -----------------------------
>  off
> (1 row)
> 
Okay. Let's say I want to fix the PostgreSQL driver to take care of that 
setting.
If that setting is turned ON then a string can have backslashes and they would 
NOT be considered as escape characters. Right? So something like 
'this\is\a\small\test' would be the same as using E'this\\is\\a\\smal\\test'. 
Right? But for someone NOT setting 'standard_conforming_strings' to 'on' the 
string 'this\is\a\small\test' would produce the wrong result. So either I have 
to check for 'standard_conforming_strings' and look if it is set to 'on' or I 
write every text with the E'' notation and don't care about 
'standard_conforming_strings' bein 'on' or 'off'. But I would then need to 
escape every text while writing and unescaping it after reading. So this would 
be a performance penalty but would avoid bug reports like this one. Right?


> Alban Hertroys
> 
> --
-- 
Kind Regards from Switzerland,

Stevan Bajić

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to