Changeset

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
parents 13843:87dd8639f08f
children 13846:14a4c0d774f2 13847:cbd234461c41
files plugins/mod_storage_sql.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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