!102 Fix Vastbase BINARY format handling in PostgreSQL COPY command

Merge pull request !102 from yayaxxww/master
This commit is contained in:
阿妮亚
2025-11-03 03:58:37 +00:00
committed by Gitee

View File

@@ -41,7 +41,7 @@ namespace SqlSugar
string copyString = $"COPY {dt.TableName} ( {string.Join(",", lsColNames)} ) FROM STDIN (FORMAT BINARY)";
var innertemp = this.Context.CurrentConnectionConfig?.MoreSettings?.InnerTemp as DbType?;
if (this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.OpenGauss ||
(this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.Vastbase && innertemp == DbType.MySql))
this.Context?.CurrentConnectionConfig?.MoreSettings?.DatabaseModel == DbType.Vastbase)
{
copyString = copyString.Replace("(FORMAT BINARY)", "(FORMAT 'BINARY')");
}