From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #901: How do I extend pgvector with a custom distance metric?
Date: Tue, 30 Sep 2025 20:36:23 +0000
Message-ID: <gh-pgvector-pgvector-901-c3353721137@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-901@github.com>
References: <gh-pgvector-pgvector-901@github.com>
Hi @Wulfsta, you'll need to use a language other than `SQL` for the function (like `plpgsql`), but the rest looks reasonable (support function 1 is the distance function for HNSW). Also, need a semi-colon instead of a comma at the end of `CREATE OPERATOR CLASS`.