[postmodern-devel] String escaping (was: WITH-SAVEPOINT macro)

Ivan Boldyrev lispnik at gmail.com
Sat Jan 5 13:03:44 UTC 2008


On 10075 day of my life Marijn Haverbeke wrote:
> Okay, I think I fixed the code, and I added documentation. Could you
> see whether the current version works for you? If so, I will release
> it as a new version.

My code seems to work fine with new version.

But wait a minute. :)

CL-USER> (postmodern:query (:select "\\'"))
WARNING: Postgres warning: nonstandard use of \\ in a string literal
Use the escape string syntax for backslashes, e.g., E'\\'.
(("\\'"))

SQL-IZE escapes #\' and #\\, however PosgreSQL (unlike MySQL) doesn't
like \ in ordinary string, but have special E'...' syntax.  Of course,
warnings can be just ignored, and I can also supress this warning with
setting standard_conforming_strings off, but isn't it better to output
all string literals with E'...' syntax?  Just add one letter :)

-- 
Ivan Boldyrev

                       Perl is a language where 2 x 2 is not equal to 4.



More information about the postmodern-devel mailing list