#38 wrong default for cursor.arraysize


In 0.9.2c3, cursor.arraysize has a default of 100. But
the DB-API 2.0 spec in PEP 0249 says


        This read/write attribute specifies the

number of rows to
fetch at a time with fetchmany(). It
defaults to 1 meaning
to fetch a single row at a time.

It'd be a very simple fix in the BaseCursor
constructor, but backward incompatible if people relied
on this behaviour.


  • Andy Dustman

    Andy Dustman - 2002-07-30

    Logged In: YES

    I've been aware of this specified limit for some time, and I
    think 1 is a dumb default limit. Nobody's ever going to use
    that as a default; they're always going to either supply the
    number of rows to return as an argument or else override the
    default. At least 100 gives a reasonable number of rows.

    I'm probably not going to change this without a more
    compelling reason.

  • Gerhard Häring

    Gerhard Häring - 2002-07-30

    Logged In: YES

    That's ok with me. I only became aware of it because
    somebody asked about why pyPgSQL and MySQLdb had different
    defaults on the python-de mailing list. Just wanted to let
    you know in case you weren't aware of it.

    Personally, I always use fetchmany with an explict argument,


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks