Skip to content

1e10 and greater Ecto Table Row Count doesn't render correctly #484

@kaaboaye

Description

@kaaboaye

Hi,

I've noticed that row count doesn't render correctly on one of my tables.

Image

I'm guessing that it happens so because of row count being a bit to large. PG is storing this tuple count as real which is a 32 bit float which has quite small precision and it might happen that without explicit rounding we will get some decimal points there which can break the rendering.

The rest of tables are rendering just fine.

The following SQL query returns the following result

SELECT reltuples AS estimated_count, pg_typeof(reltuples), reltuples::bigint
FROM pg_class
WHERE relname = 'some_table';
estimated_count pg_typeof reltuples
1.1036941e+10 real 11036941312

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions