Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 13845:2558be2daaca 13.0
mod_storage_sql: Retrieve all indices to see if the new one exists
Otherwise it warns about it being missing, even if it exists.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 11 Apr 2025 09:45:04 +0200 |
parent | 13838:a93e7310bfcd |
child | 13852:ce4b4c2863f3 |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Thu Apr 10 16:07:32 2025 +0100 +++ b/plugins/mod_storage_sql.lua Fri Apr 11 09:45:04 2025 +0200 @@ -883,7 +883,7 @@ indices[row[1]] = true; end elseif params.driver == "PostgreSQL" then - for row in engine:select [[SELECT "indexname" FROM "pg_indexes" WHERE "tablename"='prosody' AND "indexname"='prosody_index';]] do + for row in engine:select [[SELECT "indexname" FROM "pg_indexes" WHERE "tablename"='prosody';]] do indices[row[1]] = true; end end