The Postgres connector's lambda-to-SQL flow builds predicate strings but then inserts them into queries in a way that treats them as SQL literals (quoted strings) rather than expressions. This results in queries like WHERE '"content_type" = 'course'' which Postgres rejects as an invalid boolean. The fix is to pass parsed clauses into psycopg.sql as sql.SQL(...)/sql.Composed objects (or better: return parameterized clauses + params). I'm attaching a small patch that converts where_clauses to sql.SQL before formatting; I'd be happy to open a PR that returns parameterized clauses and params for safer construction.
The Postgres connector's lambda-to-SQL flow builds predicate strings but then inserts them into queries in a way that treats them as SQL literals (quoted strings) rather than expressions. This results in queries like WHERE '"content_type" = 'course'' which Postgres rejects as an invalid boolean. The fix is to pass parsed clauses into psycopg.sql as sql.SQL(...)/sql.Composed objects (or better: return parameterized clauses + params). I'm attaching a small patch that converts where_clauses to sql.SQL before formatting; I'd be happy to open a PR that returns parameterized clauses and params for safer construction.