Support pgvector types and functions

Description

First, let’s create a submodule hibernate-types for extensions like this. The extension itself is for PostgreSQL and includes:

  • DdlType for new SqlTypeCodes entry to map to vector($l) on PostgreSQL

  • cosine_distance function for <=> operator

  • euclidean_distance and l2_distance functions for the <-> operator

  • taxicab_distance and l1_distance functions

  • inner_product function for the <#> operator times -1

  • negative_inner_product function for the <#> operator

  • vector_dims function

  • vector_norm function

Try supporting +, -, * operators and also the sum and avg functions.

See for details.

Activity

Show:
Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Priority

Created October 25, 2023 at 5:24 PM
Updated November 23, 2023 at 1:53 PM
Resolved November 7, 2023 at 5:55 PM