Menu

#1012 Formatting floats and decimals

Fixed
nobody
None
Default
Enhancement
2009-11-23
2009-02-22
Anonymous
No

Originally created by: manfred-...@t-online.de

What is the problem that needs to be solved (required)?
A double-value of 1.0 should be displayed as 1.0 (or 1,0) an NOT as 1
A decimal(.., 2)-value of 1.2 should be displayed as 1.20 (or 1,20).

What is the idea in abstract terms (optional)?

Example workflow using the new feature (optional)?

What is a practical way to implement this idea (optional)?

Related

Tickets: #1079
Tickets: #1245
Tickets: #1396

Discussion

  • Anonymous

    Anonymous - 2009-02-22

    Originally posted by: a...@anse.de

    Why?

    However, very cosmetic in my eyes. Other users may say the opposite, or?

    Status: NeedInfo

     
  • Anonymous

    Anonymous - 2009-02-22

    Originally posted by: manfred-...@t-online.de

    I use HeidiSQL to teach my pupils and I think it's very important to see that a value
    is floating and not integer. The thing with the decimals is in deed "nice to have".
    Would it be possible to to set this formattings as an option? A value in the registry
    is ok for me.

     
  • Anonymous

    Anonymous - 2009-03-03

    Originally posted by: a...@anse.de

    A registry option is the last exit for the lost. Should do it so that everybody is ok
    with it. I agree meanwhile that displaying decimals could be nice.

    Status: Accepted

     
  • Anonymous

    Anonymous - 2009-03-09

    Originally posted by: a...@anse.de

    Just reading the MySQL documentation on float datatypes. For the decimal type it says:
    "The maximum number of digits (M) for DECIMAL is 65. The maximum number of supported
    decimals (D) is 30. If D is omitted, ..."

    So we should surely not try to display as much decimals as cen get into the number, fx:
      123,000000000000000000000000000000
       78,123000000000000000000000000000
    Instead it's nice to have at least one decimal as an indicator:
      123,0
       78,123

     
  • Anonymous

    Anonymous - 2009-10-09

    Originally posted by: leeon...@gmail.com

    thanks for reopening this one. i'd just like to note that user setting is quite
    irrelevant here. mysql will bring back these datatypes with consistent precision,
    every time. there cannot be any user choice in a GUI that requires the frontend to
    display rounded values because that leads to confusion and misinterpretation of what
    actually exists in the DB. if you need to see rounded values, have excel do it for
    you. Heidi must show what is actually returned, always.

    alternatively, the frontend may display rounded values based on user setting. BUT
    when editing, always force full precision display/edits.

    i say - no user choice. my $0.02