After the 0.3.0 release, we have encountered an issue where the register_vector function throws an error if our PostgreSQL database only has the vector extension installed, and not halfvec or sparsevec.
Steps to Reproduce:
Install the pgvector extension in PostgreSQL without halfvec or sparsevec.
Call the register_vector function.
Error:
File "/usr/local/lib/python3.9/site-packages/pgvector/psycopg2/register.py", line 23, in register_vector
cur.execute('SELECT NULL::sparsevec')
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction bloc
Expected Behavior:
The function should not break if halfvec or sparsevec are not present. It should work seamlessly with only the vector extension installed.
Description:
After the 0.3.0 release, we have encountered an issue where the register_vector function throws an error if our PostgreSQL database only has the vector extension installed, and not halfvec or sparsevec.
Steps to Reproduce:
Install the pgvector extension in PostgreSQL without halfvec or sparsevec. Call the register_vector function. Error:
Expected Behavior:
The function should not break if halfvec or sparsevec are not present. It should work seamlessly with only the vector extension installed.
Link to Relevant Code:
register_vector