<length> should be changed to <scale> for Numeric and DECIMAL types

Issue #827 resolved
Former user created an issue

SQLAlchemy uses <precision> and <length> for Numeric and DECIMAL types whereas it should use <precision> and <scale>, both, in the code and in the documentation.

Comments (5)

  1. Mike Bayer repo owner
    • changed milestone to 0.4.xx
    • changed component to sql

    feel free, although we need to maintain backwards compatibility throughout 0.4xx. I've no idea where the "length" term came from, I've searched through the type documentation for several databases to see if one of them used that term but I didn't find anything.

  2. jek
    • changed component to schema
    • changed milestone to 0.5.0

    Also needs a compatibility descriptor on 'length' for the duration of 0.5.

    The weird MySQL formatting thing (INTEGER(4)) could change to display_width at the same time.

  3. Mike Bayer repo owner

    6f60e768837f6b91a75dc2d62dbd215471bf09f7. Just noticed that display_width is here which I implemented in that changeset without realizing it's part of the request.

    I would like to remove the *args, **kwargs from AbstractType.__init__() as well, but postgres reflection is currently abusing it, perhaps other dialects too.

  4. Log in to comment