File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Sources/PostgresNIO/New/Connection State Machine Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -108,23 +108,14 @@ struct SimpleQueryStateMachine {
108108 return self . setAndFireError ( . unexpectedBackendMessage( . rowDescription( rowDescription) ) )
109109 }
110110
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-
121111 guard !self . isCancelled else {
122112 self . state = . drain( rowDescription. columns)
123113 return . failQuery( queryContext. promise, with: . queryCancelled)
124114 }
125115
126116 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)
128119 }
129120
130121 return . wait
You can’t perform that action at this time.
0 commit comments