Skip to content

fix(pgvector): normalize index_type to lowercase in _create_index to …#760

Open
shaohuasong-fang wants to merge 2 commits intozilliztech:mainfrom
shaohuasong-fang:patch-1
Open

fix(pgvector): normalize index_type to lowercase in _create_index to …#760
shaohuasong-fang wants to merge 2 commits intozilliztech:mainfrom
shaohuasong-fang:patch-1

Conversation

@shaohuasong-fang
Copy link
Copy Markdown

…match PostgreSQL access method names

PostgreSQL pgvector extension registers index access methods in lowercase (e.g. "hnsw", "ivfflat"), but the frontend passes IndexType.HNSW.value which is uppercase "HNSW", causing "access method HNSW does not exist" error.

…match PostgreSQL access method names

PostgreSQL pgvector extension registers index access methods in lowercase
(e.g. "hnsw", "ivfflat"), but the frontend passes IndexType.HNSW.value
which is uppercase "HNSW", causing "access method HNSW does not exist" error.
@sre-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shaohuasong-fang
To complete the pull request process, please assign xuanyang-cn after the PR has been reviewed.
You can assign the PR to them by writing /assign @xuanyang-cn in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@foxspy
Copy link
Copy Markdown
Collaborator

foxspy commented Apr 17, 2026

/assign @jamesgao-jpg

@shaohuasong-fang
Copy link
Copy Markdown
Author

/assign @XuanYang-cn

Replaced index_param['index_type'] with index_type_lower for consistency.
else sql.Identifier("embedding")
),
index_type=sql.Identifier(index_param["index_type"]),
[FIX] Use lowercase index_type_lower instead of original index_param["index_type"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SyntaxError [FIX]

@foxspy
Copy link
Copy Markdown
Collaborator

foxspy commented Apr 17, 2026

@shaohuasong-fang Mind running this locally first to make sure it works? Thanks!

@shaohuasong-fang
Copy link
Copy Markdown
Author

I have submitted a minor version,url :1a2c0c1

@shaohuasong-fang
Copy link
Copy Markdown
Author

I forgot copy sign "#" when i copied that line,sorry。

@shaohuasong-fang
Copy link
Copy Markdown
Author

lastest minor version is 1a2c0c1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants