8000 Added command ok for all the rest successful commands · postgres-haskell/postgres-wire@034713e · GitHub
[go: up one dir, main page]

Skip to content

Commit 034713e

Browse files
Added command ok for all the rest successful commands
1 parent d659375 commit 034713e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Database/PostgreSQL/Protocol/Decoders.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ decodeCommandResult s =
115115
"MOVE" -> MoveCompleted <$> readRows rest
116116
"FETCH" -> FetchCompleted <$> readRows rest
117117
"COPY" -> CopyCompleted <$> readRows rest
118-
_ -> fail "Unknown command in command result"
118+
_ -> pure CommandOk
119119
where
120120
space = 32
121121
readRows = maybe (fail "Invalid rows format in command result")

src/Database/PostgreSQL/Protocol/Types.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ data CommandResult
4747
| MoveCompleted RowsCount
4848
| FetchCompleted RowsCount
4949
| CopyCompleted RowsCount
50+
-- all other commands
51+
| CommandOk
5052
deriving (Show)
5153

5254
-- | Parameters of the current connection.

0 commit comments

Comments
 (0)
0