From: SteveLauC (@SteveLauC) <noreply+SteveLauC@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #693: Question: why is pgvector skipping vector dimenstion check when `typmod` is `-1`
Date: Thu, 10 Oct 2024 07:40:12 +0000
Message-ID: <gh-pgvector-pgvector-693@github.com> (raw)
Hi, thanks for this amazing extension!
Looking at the source code, I noticed that [the dimension check will be skipped](https://github.com/pgvector/pgvector/blob/fa6782985ab9fd6c3f289196b7cf3053c1d46eef/src/vector.c#L65-...) if the `typmod` argument of the text input function is `-1`, I am thinking, shouldn't this `typmod` be always given and the check of the input value be always performed? 🤔