Handle ParameterStatus in PgStream

This commit is contained in:
Julius de Bruijn 2020-07-06 14:53:45 +02:00 committed by Ryan Leckey
parent 41df13ba5a
commit e3b3806db5
3 changed files with 14 additions and 7 deletions

View File

@ -98,13 +98,6 @@ impl PgConnection {
}
},
MessageFormat::ParameterStatus => {
// informs the frontend about the current (initial)
// setting of backend parameters
// we currently have no use for that data so we promptly ignore this message
}
MessageFormat::BackendKeyData => {
// provides secret-key data that the frontend must save if it wants to be
// able to issue cancel requests later

View File

@ -104,6 +104,14 @@ impl PgStream {
}
}
MessageFormat::ParameterStatus => {
// informs the frontend about the current (initial)
// setting of backend parameters
// we currently have no use for that data so we promptly ignore this message
continue;
}
MessageFormat::NoticeResponse => {
// do we need this to be more configurable?
// if you are reading this comment and think so, open an issue

View File

@ -546,3 +546,9 @@ async fn it_closes_statement_from_cache_issue_470() -> anyhow::Result<()> {
Ok(())
}
#[sqlx_macros::test]
async fn it_can_handle_parameter_status_message_issue_484() -> anyhow::Result<()> {
new::<Postgres>().await?.execute("SET NAMES 'UTF8'").await?;
Ok(())
}