Hello,
It is the same issue as the one raised on the Npgsql Github . When trying to connect an error will be raised claiming a type with the name unknown was not found.
The solution of disabling type loading works however, but this might have unwanted consequences?
Worth investigating and adding here: cratedb-examples/by-language/csharp-npgsql at main · crate/cratedb-examples · GitHub
1 Like
amotl
January 4, 2024, 8:47am
2
Dear Jonas,
thank you for writing in and for reporting this problem. We already recognized it on behalf of our QA suite at Update to npgsql 8.0.0 by amotl · Pull Request #289 · crate/crate-qa · GitHub , but we didn’t manage to take care about it, yet.
Do you know about any more details whether “A PostgreSQL type with the name ‘unknown’” refers to a certain type, or whether it is a general error?
With kind regards,
Andreas.
Hi Andreas,
It is a certain type, happens upon opening the connection. Apparently, since .NET 8 they introducted a dependency on the “unkown” type, as seen here:
opened 03:46PM - 20 Dec 23 UTC
### Steps to reproduce
![image](https://github.com/npgsql/npgsql/assets/4102280… 6/5487add2-5480-4346-98d7-87b7514019f4)
### The issue
Can't open a connection without application crashing
```
Exception message: A PostgreSQL type with the name 'unknown' was not found in the current database info
Stack trace:
at Npgsql.Internal.NpgsqlDatabaseInfo.GetPostgresType(String pgName)
at Npgsql.Internal.PgSerializerOptions..ctor(NpgsqlDatabaseInfo databaseInfo, Func`1 timeZoneProvider)
at Npgsql.NpgsqlDataSource.<Bootstrap>d__80.MoveNext()
at Npgsql.Internal.NpgsqlConnector.<Open>d__213.MoveNext()
at Npgsql.PoolingDataSource.<OpenNewConnector>d__37.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at Npgsql.PoolingDataSource.<<Get>g__RentAsync|34_0>d.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at Npgsql.NpgsqlConnection.<<Open>g__OpenAsync|42_0>d.MoveNext()
at Npgsql.NpgsqlConnection.Open()
### Further technical details
Npgsql version: 8.0.1
PostgreSQL version: N/A
CrateDB Version: 5.1.1 (Docker)
Operating system: Win 10
Other details about my project setup:
They assume it’s standard for pg-like databases, cratedb doesn’t have one?
Thanks!
Jonas
1 Like
amotl
January 4, 2024, 10:00am
4
Hi Jonas,
excellent, thank you so much for referring us to this conversation. That will certainly help to provide better guidance for the database engineers. I will forward it into a corresponding issue at crate/crate .
With kind regards,
Andreas.
1 Like
amotl
January 4, 2024, 10:58am
5
Hi again,
Here we go.
With kind regards,
Andreas.
1 Like
amotl
January 9, 2024, 9:16pm
6
Dear Jonas,
the issue was resolved on behalf of a fix to CrateDB.
Thank you again for pointing us to the relevant conversation on GitHub.
Cheers,
Andreas.
1 Like
Jonas18
January 10, 2024, 11:40am
7
Thanks a lot Andreas, that was fast
1 Like
amotl
January 10, 2024, 1:28pm
8
Thank you. Forwarding the kudos to @mfussenegger for fixing this so quickly.