Closed maxburke closed 8 months ago
Is it possible to get the schema for queries that return no rows? For example, if Client::query doesn't return any rows it isn't possible to get the schema of the result set via the tokio_postgres API, as far as I can tell?
Client::query
Looking at the protocol docs (https://www.postgresql.org/docs/current/protocol-flow.html) I think that it might be possible to do so by looking at the RowDescription message, regardless if there are DataRow messages?
Explicitly call Client::prepare first.
Client::prepare
That definitely works; thanks!
Is it possible to get the schema for queries that return no rows? For example, if
Client::query
doesn't return any rows it isn't possible to get the schema of the result set via the tokio_postgres API, as far as I can tell?Looking at the protocol docs (https://www.postgresql.org/docs/current/protocol-flow.html) I think that it might be possible to do so by looking at the RowDescription message, regardless if there are DataRow messages?