On May 6, 2010, at 12:23 PM, Kent wrote: > I guess my suggestion is: since Oracle takes DECIMAL and NUMERIC to > mean NUMBER(38), > if SQLAlchemy interprets the generic types DECIMAL or Numeric with no > precision to allow for decimal or integer values, we should translate > that to 'NUMBER' for Oracle...
NUMBER with no p, s is a floating point type. It's not at all the same usage contract as a DECIMAL with precision and scale since FP only represents an approximation of a value. > > Thoughts? > > On May 6, 12:11 pm, Kent Bower <[email protected]> wrote: >> The following has changed since 0.5.8 in 0.6.0. I believe this is >> already known or by design from reading docs and another post but want >> to point out. >> >> If you specify a column such as this: >> Column("saleprice", Numeric, nullable=False) >> you get a 'numeric' type in PostgreSQL, which supports any type of >> number, integer or decimal. >> >> On the other hand, in Oracle (at least 10g), you get 'NUMBER(38)' which >> is *only* integer. >> >> (If I specify a precision, I don't have this problem, but there may be >> reasons to not want to specify precision.) >> So my questions are: >> >> Are we sure we are ok with this inconsistency (it makes it more >> difficult to write software that behaves identically regardless of >> database)? >> Is there a replacement type that acts the same regardless of the engine? >> >> Thanks in advance. >> >> -- >> 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 >> athttp://groups.google.com/group/sqlalchemy?hl=en. > > -- > 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. > -- 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.
