-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
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.