Hi! I’m trying to define the following function
clearTable :: String -> (Ctx, a) -> IO ()
clearTable tableName (ctx, _) = do
_ <-
Database.execute ctx.connection [sql| TRUNCATE TABLE ? |] [tableName]
return ()
to have a reusable function to truncate tables for testing. However, I run into the error syntax error at or near \"'users'\
. I suspect that postgres-simple adds ''
to parameters, which makes sense for rows but tables should not be quoted. Is there any way to pass a non-quoted parameter?