Skip to content

Bug: v2 AsyncPGVectorStore fails with mixed-case column names due to unquoted identifiers in adelete and filters #301

Description

@naveen9871

Description:
In the v2 AsyncPGVectorStore, raw SQL string construction is used instead of an ORM. While methods like aadd_embeddings correctly quote columns (e.g. "{self.id_column}"), the quoting is missing in two critical places:

  1. adelete: Uses f"{self.id_column} in ..." without quotes.
  2. _create_filter_clause: Uses self.metadata_json_column and top-level column names without quotes.

If a user configures id_column or metadata_json_column with mixed-case characters (e.g. "MyId" or "My Json"), PostgreSQL folds the unquoted identifier to lowercase, resulting in a syntax error or column does not exist.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions