Add support for vector types
Read me
Read this first before creating an issue:
- do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.
- you shall create a feature request only when it is general purpose enough.
- make sure that the feature is not already
Describe the feature
With vector search becoming available in most RDBMS, can we get native support for the vector embedding types in mysql, postgres, oracle, maria, etc?
Use cases
Right now, we have to pull down the embedding as a string type which adds unnecessary overhead and mem copies for the conversions back and forth.
Also, writing the embedding is extremely problematic since there doesn't appear a way to package it in a way that will work across all DBs. I.e. you have to use a dialect specific ColumnTransformer to wrap the string in STRING_TO_VECTOR, VEC_FromText, or ''::vector for postgres.
Contribution
Who should implement this feature ? are you volunteering for implementing this feature or do you know that is able and willing implement this feature ?
Thanks for the report. Which database are you using in particular?
Thanks for the report. Which database are you using in particular?
Hi,
The vector type is supported in:
- MySQL (on prem versions can't do vector searches though)
- MariaDB full support
- Oracle full support
- Postgres (requires pgvector plugin), or you can use pgvector/pgvector:pg17 docker image -- you enable it with "create extension vector";
I'm actually "using" all of these as I'm build a Spring Boot Starter for Hibernate Reactive.
I haven't added support for SQL Server yet, but Sql Server 2025 supports vectors as well. I haven't checked the others, although I'd assume they all support it in some form.