code optimization

This commit is contained in:
sunkaixuna
2021-08-05 21:50:32 +08:00
parent 4e05603cea
commit 681377749c

View File

@@ -482,7 +482,7 @@ namespace SqlSugar
{
var old = result;
var regex = @"^SELECT .* FROM \(((.|\n|\r)*)\) t $";
if (this.Context.CurrentConnectionConfig.DbType == DbType.MySql)
if (this.Context.CurrentConnectionConfig.DbType .IsIn( DbType.MySql,DbType.PostgreSQL))
{
result = result.Substring(0,result.Length-1);
}