mod_storage_sql: Fix column name in index check for PostgreSQL
authorKim Alvefur <zash@zash.se>
Sat, 17 Jun 2023 13:37:33 +0200
changeset 13163 706f7d1affc2
parent 13162 cf2a907ac130
child 13164 4ee9a912ceea
mod_storage_sql: Fix column name in index check for PostgreSQL Forgot to change the column name in 9a7523ea45cb
plugins/mod_storage_sql.lua
--- a/plugins/mod_storage_sql.lua	Sat Jun 17 13:36:42 2023 +0200
+++ b/plugins/mod_storage_sql.lua	Sat Jun 17 13:37:33 2023 +0200
@@ -854,7 +854,7 @@
 						indices[row[1]] = true;
 					end
 				elseif params.driver == "PostgreSQL" then
-					for row in engine:select [[SELECT "relname" FROM "pg_indexes" WHERE "tablename"='prosody' AND "indexname"='prosody_index';]] do
+					for row in engine:select [[SELECT "indexname" FROM "pg_indexes" WHERE "tablename"='prosody' AND "indexname"='prosody_index';]] do
 						indices[row[1]] = true;
 					end
 				end