I want to execute a Postgres function from Haskell which updates 3 rows but is declared with RETURNS VOID
. I run the function as follows:
catch (do execute conn "select record(?,?)" [id1, id2])
(\(e :: SomeException) -> do putStrLn ("Exception:" ++ (show e)); return False)
but this results in:
QueryError {qeMessage = "execute resulted in Col 1-column result", qeQuery = "select record(?,?)"}
The query doesn't return results:
ebdb=> select record('','');
record
--------------------
(1 row)
How can I execute this Postgresql function from Haskell?