File tree 1 file changed +2
-11
lines changed
Sources/PostgresNIO/New/Connection State Machine
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -108,23 +108,14 @@ struct SimpleQueryStateMachine {
108
108
return self . setAndFireError ( . unexpectedBackendMessage( . rowDescription( rowDescription) ) )
109
109
}
110
110
111
- // In Postgres extended queries we always request the response rows to be returned in
112
- // `.binary` format.
113
- // However, this is a simple query and almost all responses will be in text format anyway.
114
- let columns = rowDescription. columns. map { column -> RowDescription . Column in
115
- var column = column
116
- // FIXME: .binary is not valid in a simple-query
117
- column. format = . binary
118
- return column
119
- }
120
-
121
111
guard !self . isCancelled else {
122
112
self . state = . drain( rowDescription. columns)
123
113
return . failQuery( queryContext. promise, with: . queryCancelled)
124
114
}
125
115
126
116
self . avoidingStateMachineCoW { state in
127
- state = . rowDescriptionReceived( queryContext, columns)
117
+ // In a simple query almost all responses/columns will be in text format.
118
+ state = . rowDescriptionReceived( queryContext, rowDescription. columns)
128
119
}
129
120
130
121
return . wait
You can’t perform that action at this time.
0 commit comments