Return more RowDescription fields via proxy json endpoint

As we aim to align client-side behavior with node-postgres, it's necessary for us to return these fields, because node-postgres does so as well.
This commit is contained in:
Stas Kelvich
2023-06-13 01:32:34 +03:00
parent 3693d1f431
commit 4385e0c291
3 changed files with 16 additions and 11 deletions

View File

@@ -280,6 +280,11 @@ pub async fn handle(
json!({
"name": Value::String(c.name().to_owned()),
"dataTypeID": Value::Number(c.type_().oid().into()),
"tableID": c.table_oid(),
"columnID": c.column_id(),
"dataTypeSize": c.type_size(),
"dataTypeModifier": c.type_modifier(),
"format": "text",
})
})
.collect::<Vec<_>>()