Compare commits

..

2 Commits

Author SHA1 Message Date
Andrew Kane
a6420355c5 Updated FreeBSD package name in readme [skip ci] 2026-07-10 22:17:27 -07:00
Andrew Kane
73356ecfa7 Improved check for VectorArrayInit [skip ci] 2026-07-10 16:30:35 -07:00
2 changed files with 3 additions and 3 deletions

View File

@@ -1233,7 +1233,7 @@ Note: Replace `18` with your Postgres server version
Install the FreeBSD package with:
```sh
pkg install postgresql17-pgvector
pkg install postgresql18-pgvector
```
or the port with:

View File

@@ -25,8 +25,8 @@ VectorArrayInit(int maxlen, int dimensions, Size itemsize)
{
VectorArray res;
if (maxlen < 1 || dimensions < 1)
elog(ERROR, "safety check failed");
if (maxlen < 1 || dimensions < 1 || itemsize == 0)
elog(ERROR, "cannot create vector array");
/* Ensure items are aligned to prevent UB */
itemsize = MAXALIGN(itemsize);