Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tokio-postgres 0.7.14->0.7.15 regression in conversion error messages #1284

Open
@Vlad-Shcherbina

Description

@Vlad-Shcherbina

To reproduce, first run the following program, passing itpostgresql://my_postgres_server as an argument:

[dependencies]postgres ="=0.19.11"tokio-postgres ="=0.7.14"
fnmain(){letmut client = postgres::Client::connect(&std::env::args().nth(1).unwrap(), postgres::NoTls).unwrap();let row = client.query_one("SELECT 42::int4",&[]).unwrap();let _v:i64 = row.get(0);}

It will produce the following informative error message:

thread 'main' (11016648) panicked at src/main.rs:4:23:error retrieving column 0: error deserializing column 0: cannot convert between the Rust type `i64` and the Postgres type `int4`

Now changetokio-postgres version to 0.7.15:

[dependencies]postgres ="=0.19.11"tokio-postgres ="=0.7.15"

and run it again.

It will output an uninformative error message:

thread 'main' (11011839) panicked at src/main.rs:4:23:error retrieving column 0: error deserializing column 0

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp