From 44d510e51fde531c6c9d5b0f1001c752a183ac01 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 5 Jul 2024 15:51:04 +0800 Subject: [PATCH] Update pgsql --- .../PostgreSQL/Insertable/PostgreSQLInserttable.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/Insertable/PostgreSQLInserttable.cs b/Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/Insertable/PostgreSQLInserttable.cs index 31807be0f..7232e59dd 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/Insertable/PostgreSQLInserttable.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/PostgreSQL/Insertable/PostgreSQLInserttable.cs @@ -42,6 +42,10 @@ namespace SqlSugar { primaryKey = this.SqlBuilder.GetTranslationColumnName(primaryKey); } + else if(result.Key?.EndsWith(" returning $PrimaryKey") ==true) + { + result=new KeyValuePair>( result.Key.Replace(" returning $PrimaryKey", null),result.Value); + } return new KeyValuePair>(result.Key.Replace("$PrimaryKey", primaryKey), result.Value); }