C# 从带有接地字段的Postresql数据库加载数据集
我正在使用C#和Npgsql访问Postresql数据库C# 从带有接地字段的Postresql数据库加载数据集,c#,windows,npgsql,C#,Windows,Npgsql,我正在使用C#和Npgsql访问Postresql数据库 I can load tables into a dataset using Dataset loaded_data; loaded_data.Clear(); string query = "SELECT * FROM postretable"; NpgsqlDataAdapter data_adapt = new NpgsqlDataAdapter(query,connection); data_adapt.Fill(l
I can load tables into a dataset using
Dataset loaded_data;
loaded_data.Clear();
string query = "SELECT * FROM postretable";
NpgsqlDataAdapter data_adapt = new NpgsqlDataAdapter(query,connection);
data_adapt.Fill(loaded_data);
However I get an error
"42883: no binary output function available for type earth"
when there are columns of type EARTH in the table.
Is there a way to provide a binary output function for EARTH ?
谢谢地球类型似乎取决于立方体类型,它没有二进制输入/输出函数,因此Npgsql目前不支持。这是扩展中的一个PostgreSQL端限制,不幸的是,您不能对此做太多。看,这和立方体是一样的 但是,Npgsql 4.0.0版本(目前处于预览/rc中)通过NetTopologySuite.NET库包含对PostGIS(PostgreSQL空间扩展)的本机支持。这将为进行此类空间计算提供更完整、更准确的方法,并得到充分支持