Numeric(precision, scale)

On May 25, 2010, at 4:07 PM, Rich wrote:

> So what is the correct way to get specify a double precision number
> with postgres?
> Thanks - Rich
> 
> On May 6, 9:36 am, Michael Bayer <mike...@zzzcomputing.com> wrote:
>> On May 6, 2010, at 12:23 PM, Kent wrote:
>> 
>>> I guess my suggestion is:  since Oracle takes DECIMAL andNUMERICto
>>> mean NUMBER(38),
>>> if SQLAlchemy interprets the generic types DECIMAL orNumericwith 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 <k...@retailarchitects.com> 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 sqlalch...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> sqlalchemy+unsubscr...@googlegroups.com.
>>>> 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 sqlalch...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> sqlalchemy+unsubscr...@googlegroups.com.
>>> 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 sqlalch...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> sqlalchemy+unsubscr...@googlegroups.com.
>> 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 sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> 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 sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to