On an environment using SQLAlchemy 0.6.5 and psycopg 2.2.2 I run the following code:

  session.execute(Article.__table__.update()
                  .where(Article.retailer_id==self.retailer_id)
                  .where(Article.publish_end>=datetime.date.today())
                  .values(publish_end=yesterday()))

this returns a ResultProxy object, which always has rowcount set to 0:

(Pdb) p result.supports_sane_rowcount()
True
(Pdb) p result.rowcount
0

doing the same thing manually in a psql session shows that 858 rows are updated by this command. Is my expectation that result.rowcount should be set here incorrect?

Wichert.

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