pg.ddx.io pgvector/pgvector GitHub issues and pull requestshelp / color / mirror / Atom feed
[pgvector/pgvector] issue #794: Question| Should vector(N) perform a dimension check even if no check constraint is applied? 3+ messages / 2 participants [nested] [flat]
* [pgvector/pgvector] issue #794: Question| Should vector(N) perform a dimension check even if no check constraint is applied? @ 2025-03-05 10:25 "lll-lll-lll-lll (@lll-lll-lll-lll)" <noreply+lll-lll-lll-lll@github.com> 0 siblings, 0 replies; 3+ messages in thread From: lll-lll-lll-lll (@lll-lll-lll-lll) @ 2025-03-05 10:25 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> The documentation states the following, but is it necessary to attach a check constraint to vector(N)? ``` Optionally, add a [check constraint](https://www.postgresql.org/docs/current/ddl-constraints.html) to ensure data can be converted to the vector type and has the expected dimensions. ALTER TABLE items ADD CHECK (vector_dims(embedding::vector) = 3); ``` ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #794: Question| Should vector(N) perform a dimension check even if no check constraint is applied? @ 2025-03-05 14:42 "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2025-03-05 14:42 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi @lll-lll-lll-lll, that documentation is for `double precision[]` or `numeric[]` types. ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #794: Question| Should vector(N) perform a dimension check even if no check constraint is applied? @ 2025-03-05 14:42 "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2025-03-05 14:42 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ankane closed this. ^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-03-05 14:42 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-03-05 10:25 [pgvector/pgvector] issue #794: Question| Should vector(N) perform a dimension check even if no check constraint is applied? "lll-lll-lll-lll (@lll-lll-lll-lll)" <noreply+lll-lll-lll-lll@github.com> 2025-03-05 14:42 ` "ankane (@ankane)" <noreply+ankane@github.com> 2025-03-05 14:42 ` "ankane (@ankane)" <noreply+ankane@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox