Better error message for "Query resulted in a command response"
commit76987d44076058b27f5303b3372ca1ed10fabeee
authorMax Amanshauser <max@lambdalifting.org>
dateFri 22 Feb 2019, 20:36 (8 years ago)
parentb02bcf7
src/Database/PostgreSQL/Simple/Internal/PQResultUtils.hs+1−1
@@ -73,7 +73,7 @@ finishQueryWith' q result k = do
7373 case status of
7474 PQ.TuplesOk -> k
7575 PQ.EmptyQuery -> queryErr "query: Empty query"
76− PQ.CommandOk -> queryErr "query resulted in a command response"
76+ PQ.CommandOk -> queryErr "query resulted in a command response (did you mean to use `execute` or forget a RETURNING?)"
7777 PQ.CopyOut -> queryErr "query: COPY TO is not supported"
7878 PQ.CopyIn -> queryErr "query: COPY FROM is not supported"
7979#if MIN_VERSION_postgresql_libpq(0,9,3)