# CrateDB 5.5 not working out of the box with Npgsql 8: A PostgreSQL type with the name 'unknown' was not found in the current database info

**URL:** <https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689>\
**Category:** Client Libraries\
**Created:** [January 4, 2024, 8:15am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689 "2024-01-04T08:15:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonas18](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@Jonas18](https://community.cratedb.com/u/Jonas18)\
**Post date:** [January 4, 2024, 8:15am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/1 "2024-01-04T08:15:32Z")

</div>

Hello,

It is the same issue as the one raised on the [Npgsql Github](https://github.com/npgsql/npgsql/issues/5503). 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](https://github.com/crate/cratedb-examples/tree/main/by-language/csharp-npgsql)

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [January 4, 2024, 8:47am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/2 "2024-01-04T08:47:43Z")

</div>

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](https://github.com/crate/crate-qa/pull/289), 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.

---

<div class="post-metadata">

**Author:** ![Jonas18](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@Jonas18](https://community.cratedb.com/u/Jonas18)\
**Post date:** [January 4, 2024, 9:12am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/3 "2024-01-04T09:12:28Z")

</div>

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:

> <https://github.com/npgsql/npgsql/issues/5503#issuecomment-1864771863>
>
> \### 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

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [January 4, 2024, 10:00am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/4 "2024-01-04T10:00:24Z")

</div>

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](https://github.com/crate/crate).

With kind regards,  
Andreas.

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [January 4, 2024, 10:58am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/5 "2024-01-04T10:58:16Z")

</div>

Hi again,

> [@amotl](#):
>
> I will forward it into a corresponding issue at [crate/crate](https://github.com/crate/crate).

Here we go.

- [Problem with Npgsql 8: A PostgreSQL type with the name 'unknown' was not found in the current database info · Issue #15281 · crate/crate · GitHub](https://github.com/crate/crate/issues/15281)

With kind regards,  
Andreas.

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [January 9, 2024, 9:16pm UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/6 "2024-01-09T21:16:44Z")

</div>

Dear Jonas,

the issue was resolved on behalf of a fix to CrateDB.

> [@amotl](#):
>
> The problem has been fixed by a corresponding patch.
> 
> - [Add unknown type for pgwire by mfussenegger · Pull Request #15291 · crate/crate · GitHub](https://github.com/crate/crate/pull/15291)
> 
> Following up on that, the fix has been validated on behalf of the latest nightly builds of CrateDB.
> 
> - [Update to Npgsql 8.0.1 and .NET 8 by amotl · Pull Request #289 · crate/crate-qa · GitHub](https://github.com/crate/crate-qa/pull/289)
> - [CI: Add Npgsql 8.0.1 to test matrix by amotl · Pull Request #169 · crate/cratedb-examples · GitHub](https://github.com/crate/cratedb-examples/pull/169)
> 
> Thus, the improvement will become part of the upcoming release. Thank you again.
> 
> – [A PostgreSQL type with the name 'unknown' was not found in the current database info · Issue #5503 · npgsql/npgsql · GitHub](https://github.com/npgsql/npgsql/issues/5503#issuecomment-1883801663)

Thank you again for pointing us to the relevant conversation on GitHub. 💙

Cheers,  
Andreas.

---

<div class="post-metadata">

**Author:** ![Jonas18](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@Jonas18](https://community.cratedb.com/u/Jonas18)\
**Post date:** [January 10, 2024, 11:40am UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/7 "2024-01-10T11:40:17Z")

</div>

Thanks a lot Andreas, that was fast 🙂

---

<div class="post-metadata">

**Author:** ![amotl](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/amotl/32/617_2.png) [@amotl](https://community.cratedb.com/u/amotl)\
**Post date:** [January 10, 2024, 1:28pm UTC](https://community.cratedb.com/t/cratedb-5-5-not-working-out-of-the-box-with-npgsql-8-a-postgresql-type-with-the-name-unknown-was-not-found-in-the-current-database-info/1689/8 "2024-01-10T13:28:08Z")

</div>

Thank you. Forwarding the kudos to @mfussenegger for fixing this so quickly.
