On May 23, 2008, at 2:49 AM, schickb wrote:

>
> On May 22, 8:37 pm, schickb <[EMAIL PROTECTED]> wrote:
>> Maybe SA is putting second execute in a transaction that isn't
>> being commited?
>
> That was the problem. I found this in the SA docs: "While many DBAPIs
> implement a flag called autocommit, the current SQLAlchemy behavior is
> such that it implements its own autocommit. This is achieved by
> searching the statement for strings like INSERT, UPDATE, DELETE, etc.
> and then issuing a COMMIT automatically if no transaction is in
> progress."
>
> I fixed the issue by wrapping the execute with trans = dbconn.begin()
> before and trans.commit() after. Seems like the decision to autocommit
> raw sql statements would be better left to the DBAPIs since they know
> more about non-standard sql statements like COPY.

MySQLDB and Pysqlite are the only two DBAPIs I know of which have an  
"autocommit" feature.   By using our own we gain much better  
consistency of behavior across all platforms.

Add a trac ticket for "COPY" and we'll add it to the list of supported  
transactional keywords for PG.



--~--~---------~--~----~------------~-------~--~----~
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