> seems there is some other prob too:
> - in 0.3 it is issued 2 statements:
> select nextval('"Manager_id_seq"')
> and then:
> INSERT INTO "Manager" (duties, name, id) VALUES (%(duties)s, %(name)s,
> %(id)s)
> with the ids got from the db and the other parameters.
>
> - in 0.4 it is issued only the last insert with all ids None which
> leads to the error
>   

If you have to insert a lot of this... (and id is a serial) let postgres 
do his work.

sql="""INSERT INTO "Manager" (duties, name) VALUES (%(duties)s, 
%(name)s) """
list_qry_params = [('dut1','name1'),('dut2','name2'),('dut_n','name_n')]
engine.connect().execute(sql, list_qry_params )



Glauco



-- 
+------------------------------------------------------------+
                                  Glauco Uri - Programmatore
                                    glauco(at)allevatori.com 
                               
  Sfera Carta Software(r)      [EMAIL PROTECTED]
  Via Bazzanese,69  Casalecchio di Reno(BO) - Tel. 051591054 
+------------------------------------------------------------+



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to