Psycopg and also some other database drivers using parameters like this:
SELECT * FROM some_table WHERE id = %(customer_id)s
-- or also
SELECT * FROM some_table WHERE id = %s
However, this is not parse-able by sqlglot currently:
import sqlglot as sg
print(
repr(sg.parse_one("SELECT * FROM some_table WHERE id = $customer_id", read="postgres"))
) # works
print(
repr(sg.parse_one("SELECT * FROM some_table WHERE id = %(customer_id)s", read="postgres"))
) # fails, it's somehow expecting modulo here
Docs: https://www.psycopg.org/psycopg3/docs/basic/params.html