-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I'm experiencing a strange problem with a multi INSERT statement.

Strange because I'm unable to reproduce it.

Here are both SQLAlchemy (trunk) and PostgreSQL (8.3) logs:

sqlalchemy.exc.ProgrammingError: (ProgrammingError) syntax error at
position 9 near "-"
 "INSERT INTO cms_categories (type, category_slug, category,
description, seq) VALUES (%(type)s, %(category_slug)s, %(category)s,
%(description)s, nextval('cms_categories_seq'))" [{'category':
'Normativa e legislazione', 'type': 'article', 'description': u"La
legislazione italiana e la legislazione in altri paesi comunitari. Il
diritto internazionale e transnazionale: cosa bisogna fare se si \xe8
Italiani all'estero o Italiani residenti in Italia ma che intendono
sposare cittadini di altre nazionalit\xe0.\n", 'category_slug':
'normativa-e-legislazione'}, {'category': 'Riti e religioni', 'type':
'article', 'description': u"Le principali religioni monoteistiche e i
riti previsti in ciascuna. I riti misti, le compatibilit\xe0 e
incompatibilit\xe0, le conversioni. L'approccio razionalistico, il
matrimonio civile e i  patti sociali.\n", 'category_slug':
'riti-e-religioni'}] ... and a total of 17 bound parameter sets


2010-02-01 16:08:14 CET ERROR:  syntax error at position 9 near "-"
2010-02-01 16:08:14 CET STATEMENT:  INSERT INTO cms_categories (type,
category_slug, category, description, seq) VALUES (E'article',
E'normativa-e-legislazione', E'Normativa e legislazione', E'La
legislazione italiana e la legislazione in altri paesi comunitari. Il
diritto internazionale e transnazionale: cosa bisogna fare se si è
Italiani all''estero o Italiani residenti in Italia ma che intendono
sposare cittadini di altre nazionalità.
        ', nextval('cms_categories_seq'))


The problem is probably with the tab character in the category field.
I have no idea why there is a tab character there.

Data is loaded from a YAML file, but even if I use the same data I'm not
able to reproduce the problem.
The original program loads, in an unique transaction, several fixtures.


Thanks   Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAktm/ZMACgkQscQJ24LbaUToxgCgmM8ADXGUN8hJqHCsLyYzWSDs
sXMAn2mzj+0haQyAa2mfP01N4mouJ/rw
=HETb
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to