Informix query.count does not work.

Issue #2162 resolved
Former user created an issue

Using the count method on an orm query will fail with informix because informix does not consider the output of count(1) as valid syntax.

Using count(*) however does work and I would imagine is probably supported by every database.

Unfortunately, I am unable to write a test case for this bug, but I have attached a diff with a fix for the offending code.

Richard Murri

Comments (5)

  1. Mike Bayer repo owner
    • changed component to orm
    • assigned issue to
    • changed milestone to 0.7.0

    I want to make one more pass through the oracle rumor mill regarding this. its an old DBA's tale that oracle performs better when its "select 1". I think its been disproven, however.

  2. Mike Bayer repo owner

    Our main oracle user approves so this is fine to go in. But I'd like to leave it on 0.7 since we prefer to push behavioral changes to upcoming major versions.

  3. Former user Account Deleted

    Sounds good. Another option is to add an parameter to the count method that lets you specify what you're counting.

  4. Log in to comment