On Wed, Jun 05, 2013 at 06:09:34PM +0200, dev@... wrote:
> ubuntu 12.04 server LTS has version 0.12.4 in package management. Guess
Ah, the joys and wonders of Debian the Stable! :-))) Yes, some
packages in Debian/Ubuntu are too stable. Stuck, I dare say. Browsers,
for example -- both FFox and Chrome. I've got a habit of upgrading them
manually. And of course I do the same for SQLObject.
> I will better install this using the suggested method on the homepage.
Or you can download an egg and install it using easy_install. Or
download the source tarball, unpack it and run
sudo python setup.py install -O2
Oleg.
--
Oleg Broytman http://phdru.name/ phd@...
Programmers don't die, they just GOSUB without RETURN.

On Wed, Jun 05, 2013 at 08:54:20AM +0200, Thomas Siemion <dev@...> wrote:
> Hey folks,
>
> I was wondering why the sqlrepr from converters.py is escaping
> linebreaks and other chars for postgres.
>
> I'm talking about this piece of code:
>
> sqlStringReplace = [
> ("'", "''"),
> ('\\', '\\\\'),
> ('\000', '\\0'),
> ('\b', '\\b'),
> ('\n', '\\n'),
> ('\r', '\\r'),
> ('\t', '\\t'),
> ]
>
> This causes for e.g. \ to multiply. when I comment out everything but
> the escaping of the single quote everything works as aspected. I don't
> see the reason why this is done in the first place.
>
> Could anyone please explain this to me and why this is done when saving
See
http://www.postgresql.org/docs/8.4/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
"PostgreSQL also accepts "escape" string constants, which are an
extension to the SQL standard. An escape string constant is specified by
writing the letter E (upper or lower case) just before the opening
single quote, e.g., E'foo'. (When continuing an escape string constant
across lines, write E only before the first opening quote.) Within an
escape string, a backslash character (\) begins a C-like backslash
escape sequence, in which the combination of backslash and following
character(s) represent a special byte value, as shown in Table 4-1."
Also see https://dev.mysql.com/doc/refman/5.0/en/string-literals.html
> but not undone when loaing?
Because there is no need to "undone" anything. The backend doesn't
store escaped values -- it stores normal values that it sends back on
SELECTing.
> Regards
> Thomas
Oleg.
--
Oleg Broytman http://phdru.name/ phd@...
Programmers don't die, they just GOSUB without RETURN.

Hey folks,
I was wondering why the sqlrepr from converters.py is escaping
linebreaks and other chars for postgres.
I'm talking about this piece of code:
sqlStringReplace = [
("'", "''"),
('\\', '\\\\'),
('\000', '\\0'),
('\b', '\\b'),
('\n', '\\n'),
('\r', '\\r'),
('\t', '\\t'),
]
This causes for e.g. \ to multiply. when I comment out everything but
the escaping of the single quote everything works as aspected. I don't
see the reason why this is done in the first place.
Could anyone please explain this to me and why this is done when saving
but not undone when loaing?
Regards
Thomas
--
Programmierer
Affective Internet Services
Inh. R. Tissler
Hammer Str. 39
48153 Münster
Tel: 0251-14989390
Fax: 0251-14989395
Web: http://www.affective.de
Email: siemion@...