Skip to content

Commit 27f61ef

Browse files
committed
Npgsql/Geo: Add remarks about why Npgsql.GeoJSON isn't working
1 parent 48f362e commit 27f61ef

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

by-language/csharp-npgsql/DemoProgram.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public static NpgsqlConnection GetConnection(string connString)
5151

5252
// Enable PostGIS/GeoJSON Type Plugin.
5353
// https://www.npgsql.org/doc/types/geojson.html
54+
// `NpgsqlDbType.Geometry` can not be used with CrateDB,
55+
// see also https://github.com/npgsql/npgsql/issues/2411.
5456
// dataSourceBuilder.UseGeoJson();
5557

5658
var dataSource = dataSourceBuilder.Build();

by-language/csharp-npgsql/DemoTypes.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,9 @@ public async Task InsertGeoJsonTyped()
364364
*
365365
* System.NotSupportedException : The NpgsqlDbType 'Geometry' isn't present in your
366366
* database. You may need to install an extension or upgrade to a newer version.
367+
* See also https://github.com/npgsql/npgsql/issues/2411.
367368
*/
368-
Console.WriteLine("Running InsertGeo");
369+
Console.WriteLine("Running InsertGeoJsonTyped");
369370

370371
// Insert single data point.
371372
await using (var cmd = new NpgsqlCommand("""

by-language/csharp-npgsql/demo.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<ItemGroup>
1313
<PackageReference Include="GeoJSON.Net" Version="1.4.1" />
1414
<PackageReference Include="Npgsql" Version="9.0.4" />
15+
<!-- <PackageReference Include="Npgsql.GeoJSON" Version="9.0.4" /> -->
1516
<PackageReference Include="CommandLineParser" Version="2.9.1" />
1617
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
1718
<PackageReference Include="xunit" Version="2.9.3" />

0 commit comments

Comments
 (0)