我想从 Haskell 执行一个 Postgres 函数,它更新 3 行,但用RETURNS VOID
. 我按如下方式运行该函数:
catch (do execute conn "select record(?,?)" [id1, id2])
(\(e :: SomeException) -> do putStrLn ("Exception:" ++ (show e)); return False)
但这会导致:
QueryError {qeMessage = "execute resulted in Col 1-column result", qeQuery = "select record(?,?)"}
查询不返回结果:
ebdb=> select record('','');
record
--------------------
(1 row)
如何从 Haskell 执行这个 Postgresql 函数?