-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Labels
bugSomething isn't working or in unexpected waysSomething isn't working or in unexpected waysrestserverAffects the rest server.Affects the rest server.
Milestone
Description
Just noticed that there's an SQL failure when uploading a file and trying to update the FTS on PostgreSQL:
docspell-joex[103677]: 2023.11.10 15:44:37 [io-comp...] ERROR docspell.ftspsql.DoobieMeta - SQL Failure: ExecFailure(UPDATE ftspsql_search SET lang = ?, folder_id = ?, attach_name = ?, attach_content = ?, item_name = ?, item_notes = ?, fts_config = ?::regconfigWHERE id = ? ,List(German, None, None, None, Some(DB Ticket Weimar), None, german, Ident(item.9xAePRDDpfc-FjnS3gr3LEY-3Tp4KjZvYnZ-BgXMJFwdajj)),443032 nanoseconds,org.postgresql.util.PSQLException: ERROR: syntax error at or near "id" Position: 159)
There's a space missing in … fts_config = ?::regconfigWHERE id = ? …
.
This seems to be generated here: https://github.com/eikek/docspell/blob/master/modules/fts-psql/src/main/scala/docspell/ftspsql/FtsRepository.scala#L144 and maybe just adding a space before WHERE
would do the trick.
I am a bit confused though because the same problem exists 4 times in this file:
- https://github.com/eikek/docspell/blob/master/modules/fts-psql/src/main/scala/docspell/ftspsql/FtsRepository.scala#L136
- https://github.com/eikek/docspell/blob/master/modules/fts-psql/src/main/scala/docspell/ftspsql/FtsRepository.scala#L155
- https://github.com/eikek/docspell/blob/master/modules/fts-psql/src/main/scala/docspell/ftspsql/FtsRepository.scala#L156
Happy to create the PR, but I have no idea what's going on as I don't understand Scala.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working or in unexpected waysSomething isn't working or in unexpected waysrestserverAffects the rest server.Affects the rest server.