microsoft / microsoft/semantic-kernel

Python postgres connector

Open
#13,595 2 comments 0 reactions 1 assignee View on GitHub

@tejasai97 is already working on this.

Since Apr 29, 2026.

bug python
Dominant language
C#
Stars
28.6k
Forks
4.8k
Avg merge
14h 13m
Merged PRs (30d)
18

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.