Skip to content

ParseInt error when scanning table #22

Closed

Description

@honza
2016/01/05 11:42:24 Starting Pome 0.1.0
2016/01/05 11:42:24 Application will be available at http://127.0.0.1:2345
2016/01/05 11:42:24 sql: Scan error on column index 3: converting string "1.1198464e+07" to a int: strconv.ParseInt: parsing "1.1198464e+07": invalid syntax

Using version 804786e

Activity

  1. ober commented on Jan 5, 2016

    @ober

    Hit by it too.

  2. rach commented on Jan 6, 2016

    @rach
    Owner

    I will try to get that fixed asap. I suspect that some of the sql query needs some adjustment as the Go Sql lib cannot handle the conversion.

  3. rach commented on Jan 6, 2016

    @rach
    Owner

    It seems like the problem come from SUM used for the database size. SUM of bigint return a numeric type. I don't think that we will support db above int64 size

     select pg_size_pretty(9223372036854775807);
     pg_size_pretty
    ----------------
     8388608 TB
    (1 row)
    

    I now cat the result to bigint so it should solve the problem.
    I wasn't not able to reproduce the bug even when replacing query with SELECT 1.1198464e+07 , 1.1198464e+07::numeric so it will be amazing if you could test b051abf

    thanks

  4. honza commented on Jan 6, 2016

    @honza
    Author

    Unfortunately, the problem persists:

    2016/01/06 10:13:54 Starting Pome 0.1.1
    2016/01/06 10:13:54 Application will be available at http://127.0.0.1:2345
    2016/01/06 10:13:54 sql: Scan error on column index 3: converting string "1.1198464e+07" to a int: strconv.ParseInt: parsing "1.1198464e+07": invalid syntax
    

    The database is pretty small, like 300MB.

    I'm using Postgresql 9.4.5 on OSX.

  5. rach commented on Jan 6, 2016

    @rach
    Owner

    I will publish a verbose mode later tonight, I realize that I added the cast on the wrong db query.
    Base on the index 3 then it means that the problem appear on TableBloat.
    Thanks for trying and your patience, I'll try get that fixed asap.

  6. internetuser2008 commented on Jan 6, 2016

    @internetuser2008

    Getting same error on Mac OSX Postgres 9.4.4

    2016/01/06 13:52:21 Starting Pome 0.1.1
    2016/01/06 13:52:21 Application will be available at http://127.0.0.1:2345
    2016/01/06 13:52:21 sql: Scan error on column index 3: converting string "2.031616e+06" to a int: strconv.ParseInt: parsing "2.031616e+06": invalid syntax

  7. jmealo commented on Jan 6, 2016

    @jmealo

    Same issue using the latest Go and Pome on Ubuntu 14.04 (64-bit).

  8. ThisIsMissEm commented on Jan 7, 2016

    @ThisIsMissEm

    I'm getting similar, with 2016/01/07 03:19:55 sql: Scan error on column index 3: converting string "4.145152e+06" to a int: strconv.ParseInt: parsing "4.145152e+06": invalid syntax

  9. added 2 commits that reference this issue on Jan 7, 2016
    cb0666c
    c866672
  10. honza commented on Jan 7, 2016

    @honza
    Author

    The fix works for me, thanks. ✨

  11. rach commented on Jan 8, 2016

    @rach
    Owner

    Great. Thanks for testing it. I should have been more careful about the types of some of the SQL query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址