haskellari / postgresql-simple

Mid-level client library for accessing PostgreSQL from Haskell
Other
88 stars 46 forks source link

Syntax error on a multi-row template #106

Closed dustin closed 1 year ago

dustin commented 1 year ago

I've got this error on what seems to be a pretty simple query.

FormatError {fmtMessage = "syntax error in multi-row template",
             fmtQuery = "update metablob set meta = null, backedup = true where media_id = ?",
             fmtParams = []}

It's unclear to me the syntax error is. This is a chunk of code I've been migrating from SQLite and I'd expect this to work without issue.

phadej commented 1 year ago

Possibly duplicate of https://github.com/haskellari/postgresql-simple/issues/98

Without a reproducer, I cannot help you.

dustin commented 1 year ago

OK, well, the query's right there. Having read the source code, I see where the bug is. This is just a duplicate of #58

phadej commented 1 year ago

By reproducer I meant how the library was used, in particular Haskell code. (I had to guess you used executeMany where you probably wanted something else).

Closing as confirmed to be a duplicate.