From aa1e59c241f0b800f7ee3c72d5823793f27eb775 Mon Sep 17 00:00:00 2001 From: sunkaixuna <610262374@qq.com> Date: Mon, 15 Nov 2021 13:00:29 +0800 Subject: [PATCH] PgSql GetColumnsByTableName --- .../PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs index e8e94bb9d..7e54d13fc 100644 --- a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs @@ -32,7 +32,7 @@ namespace SqlSugar then true else false end as IsIdentity, case when pcolumn.is_nullable = 'YES' then true else false end as IsNullable - from (select * from pg_tables where tablename = '{0}' and schemaname='public') ptables inner join pg_class pclass + from (select * from pg_tables where upper(tablename) = upper('{0}') and schemaname='public') ptables inner join pg_class pclass on ptables.tablename = pclass.relname inner join (SELECT * FROM information_schema.columns ) pcolumn on pcolumn.table_name = ptables.tablename