Summary
Whenever a query has an issue, the tokio_postgres connection is simply closed.
Instead I would expect the connection to remain open and healthy and the query produce a more specific query parse error.
Reproduction
Just put some rubbish here: https://github.com/f0rr0/pglite-oxide/blob/main/tests/client_compat.rs#L16, e.g.:
let row = client
.query_one("FOO SELECT $1::int4 + 1 AS answer", &[&41_i32])
.await
.context("run tokio-postgres parameter query")?;
which will yield:
failures:
---- tokio_postgres_extended_query_works stdout ----
Error: run tokio-postgres parameter query
Caused by:
connection closed
failures:
tokio_postgres_extended_query_works
Versions
v0.3.0 and trunk. Linux
Summary
Whenever a query has an issue, the
tokio_postgresconnection is simply closed.Instead I would expect the connection to remain open and healthy and the query produce a more specific query parse error.
Reproduction
Just put some rubbish here: https://github.com/f0rr0/pglite-oxide/blob/main/tests/client_compat.rs#L16, e.g.:
which will yield:
Versions
v0.3.0 and trunk. Linux