From cdfbd73cc53bbcaac02004d7c7c71cb8d3af8e77 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 3 Oct 2021 20:35:31 +0200 Subject: [PATCH] #175 try to fix postgres analyser --- plugins/dbgate-plugin-postgres/src/backend/Analyser.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/dbgate-plugin-postgres/src/backend/Analyser.js b/plugins/dbgate-plugin-postgres/src/backend/Analyser.js index 3b5243259..0d503a02c 100644 --- a/plugins/dbgate-plugin-postgres/src/backend/Analyser.js +++ b/plugins/dbgate-plugin-postgres/src/backend/Analyser.js @@ -127,6 +127,7 @@ class Analyser extends DatabaseAnalyser { idx.indkey .split(' ') .map(colid => indexcols.rows.find(col => col.oid == idx.oid && col.attnum == colid)) + .filter(col => col != null) .map(col => ({ columnName: col.column_name, })) @@ -145,6 +146,7 @@ class Analyser extends DatabaseAnalyser { idx.indkey .split(' ') .map(colid => indexcols.rows.find(col => col.oid == idx.oid && col.attnum == colid)) + .filter(col => col != null) .map(col => ({ columnName: col.column_name, }))