From 02af761bf7cc0d841899e0f5c15cba91d4c12248 Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Fri, 20 Sep 2024 15:50:16 +0200 Subject: [PATCH] postgre fix --- plugins/dbgate-plugin-postgres/src/backend/sql/uniqueNames.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/dbgate-plugin-postgres/src/backend/sql/uniqueNames.js b/plugins/dbgate-plugin-postgres/src/backend/sql/uniqueNames.js index f22b1c94f..edf45be44 100644 --- a/plugins/dbgate-plugin-postgres/src/backend/sql/uniqueNames.js +++ b/plugins/dbgate-plugin-postgres/src/backend/sql/uniqueNames.js @@ -1,3 +1,5 @@ module.exports = ` - select conname as "constraint_name" from pg_constraint where contype = 'u' and connamespace =SCHEMA_NAME_CONDITION + select cnt.conname as "constraint_name" from pg_constraint cnt + inner join pg_namespace c on c.oid = cnt.connamespace + where cnt.contype = 'u' and c.nspname =SCHEMA_NAME_CONDITION `;