Skip to content

Enhancement: support popular Postgres extension dialects #358

@ftsartek

Description

@ftsartek

Summary

SQLGlot's support for certain popular Postgres extensions is effectively nonexistent if the tokeniser comes across a partial match for a valid 'base' comparator within an extension comparator.

PGVector has partial support currently by the nature of some of its comparators such as <-> are already defined (albeit for separate usage) in the base keywords.

Some of the extended PGVector comparators like <#> however, as well as ParadeDB's comparators (||| and &&&) are not supported by SQLGlot because the tokeniser will partially match them against other keywords (e.g. && or #>).

There's already an example of extended dialects for Spanner/Spangres which give a good example of how this would need to plug in. One note here is that the PGVector/ParadeDB would apply to multiple dialects (asyncpg, psycopg, psqlpy and probably others) so these might need to be centralised externally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions