When I initialize pgvector like this:
pgv, err := pgvector.New(
...
pgvector.WithEmbeddingTableName("custom_name"),
)
The WithEmbeddingTableName sanitizes the input and its value becomes "\"custom_name\"", which is set on Store.embeddingTableName.
This then raises an error when the init method is called and it tries to create an index:
sql = fmt.Sprintf(`CREATE INDEX IF NOT EXISTS %s_collection_id ON %s (collection_id)`, s.embeddingTableName, s.embeddingTableName)
The generated error is:
ERROR: syntax error at or near "_collection_id" (SQLSTATE 42601)
I believe we could do away with the sanitization part in WithEmbeddingTableName