diff --git a/Src/Asp.Net/SqlSugar/Realization/Kdbndp/DbBind/KdbndpBind.cs b/Src/Asp.Net/SqlSugar/Realization/Kdbndp/DbBind/KdbndpBind.cs index 8c046bb84..c3b427513 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Kdbndp/DbBind/KdbndpBind.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Kdbndp/DbBind/KdbndpBind.cs @@ -139,10 +139,17 @@ namespace SqlSugar new KeyValuePair("bit",CSharpDataType.byteArray), new KeyValuePair("blob",CSharpDataType.byteArray), new KeyValuePair("bit varying",CSharpDataType.byteArray), + new KeyValuePair("binary",CSharpDataType.byteArray), + new KeyValuePair("varbinary",CSharpDataType.byteArray), + new KeyValuePair("image",CSharpDataType.byteArray), new KeyValuePair("varbit",CSharpDataType.@byte), new KeyValuePair("rowversion",CSharpDataType.byteArray), - new KeyValuePair("regclass",CSharpDataType.@object) - + new KeyValuePair("regclass",CSharpDataType.@object), + + new KeyValuePair("geometry",CSharpDataType.@object), + new KeyValuePair("public.geometry",CSharpDataType.@object), + new KeyValuePair("geography",CSharpDataType.@object), + new KeyValuePair("public.geography",CSharpDataType.@object), }; public override List StringThrow { diff --git a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs index 25dc14127..afed95a6c 100644 --- a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs +++ b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs @@ -165,6 +165,7 @@ namespace SqlSugar new KeyValuePair("varbit",CSharpDataType.@byte), new KeyValuePair("time",CSharpDataType.TimeSpan), new KeyValuePair("public.geometry",CSharpDataType.@object), + new KeyValuePair("public.geography",CSharpDataType.@object), new KeyValuePair("inet",CSharpDataType.@object), new KeyValuePair("number",CSharpDataType.@int), diff --git a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs index 4b57a7f27..44627f5f9 100644 --- a/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbMaintenance/PostgreSQLDbMaintenance.cs @@ -250,6 +250,18 @@ namespace SqlSugar #endregion #region Methods + public override bool IsAnyTable(string tableName, bool isCache = true) + { + if (isCache == false) + { + var sql = $" SELECT 1 FROM pg_catalog.pg_tables \r\n WHERE schemaname = '"+GetSchema()+ "' \r\n AND Lower(tablename) = '" + tableName.ToLower()+"' "; + return this.Context.Ado.GetInt(sql) > 0; + } + else + { + return base.IsAnyTable(tableName, isCache); + } + } public override List GetDbTypes() { var result = this.Context.Ado.SqlQuery(@"SELECT DISTINCT data_type