Skip to content

Commit 7bad3ce

Browse files
committed
correct docs
1 parent 5961b27 commit 7bad3ce

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Sources/PostgresNIO/New/Connection State Machine/SimpleQueryStateMachine.swift

+2-6
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,12 @@ struct SimpleQueryStateMachine {
108108
return self.setAndFireError(.unexpectedBackendMessage(.rowDescription(rowDescription)))
109109
}
110110

111-
// In Postgres extended queries we receive the `rowDescription` before we send the
112-
// `Bind` message. Well actually it's vice versa, but this is only true since we do
113-
// pipelining during a query.
114-
//
115-
// In the actual protocol description we receive a rowDescription before the Bind
116-
117111
// In Postgres extended queries we always request the response rows to be returned in
118112
// `.binary` format.
113+
// However, this is a simple query and almost all responses will be in text format anyway.
119114
let columns = rowDescription.columns.map { column -> RowDescription.Column in
120115
var column = column
116+
// FIXME: .binary is not valid in a simple-query
121117
column.format = .binary
122118
return column
123119
}

0 commit comments

Comments
 (0)