quarkiverse / quarkus-embedded-postgresql

Allowing you to unit test with a PostgreSQL DB without requiring end users to install and set up a database cluster
https://github.com/zonkyio/embedded-postgres
Apache License 2.0
9 stars 13 forks source link

Support Hibernate Vectors #97

Open melloware opened 4 months ago

melloware commented 4 months ago

Original Quarkus ticket: https://github.com/quarkusio/quarkus/issues/41569

Currently, if you want to use PostgreSQL with the hibernate-vector dependency, when using DevServices with PostgreSQL database, it starts the service with a standard PostgreSQL database image (so no vector type available).

It would be great that if DevServices detects the hibernate-vector dependency, could start the ankane/pgvector:v0.5.1 container image and execute the following command before executing any Hibernate SQL command:

CREATE EXTENSION IF NOT EXISTS vector;

Of course there are workarounds like using quarkus.datasource.devservices.image-name=ankane/pgvector:v0.5.1 and then create an import.sql file with the SQL command. But would be great that devs can smoothly start using vectors.

mcruzdev commented 2 months ago

I would like to contribute with this one 👍🏼