From bb9a2f63a485a502b00f074255ca9b56c4bc4385 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Thu, 27 Feb 2020 22:37:54 +0100 Subject: [PATCH] fix(GetConstraintsPertab): Also work with non-lowercase column names --- sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql.go b/sql.go index 2f3b485..2c2b9fa 100644 --- a/sql.go +++ b/sql.go @@ -320,7 +320,7 @@ FROM (SELECT n.nspname FROM pg_catalog.pg_class c, pg_catalog.pg_constraint con, pg_namespace n - WHERE c.oid = '%[1]s' :: regclass + WHERE c.oid = '"%[1]s"' :: regclass AND conrelid = c.oid AND n.oid = c.relnamespace AND contype IN ( 'u', 'f', 'c', 'p' )