Skip to content

fix(cli): include psycopg binary in postgres extra so driver works without system libpq#633

Open
Aaryan-549 wants to merge 1 commit intogetnao:mainfrom
Aaryan-549:fix/postgres-missing-deps
Open

fix(cli): include psycopg binary in postgres extra so driver works without system libpq#633
Aaryan-549 wants to merge 1 commit intogetnao:mainfrom
Aaryan-549:fix/postgres-missing-deps

Conversation

@Aaryan-549
Copy link
Copy Markdown
Contributor

Closes #589

PostgreSQL connections regressed in v0.1.0 because extras split in PR #477 shipped ibis-framework[postgres] alone. Latest ibis pulls
plain psycopg (psycopg3), which is pure-Python and requires system libpq at runtime — fine on dev machines with libpq-dev, broken on
Windows, WSL, and most on-prem Linux installs. Import fails with:

ImportError: no pq wrapper available. libpq library not found

which surfaces in nao as MissingDependencyError from require_database_backend("postgres"). Adding psycopg[binary] to the postgres
(and redshift, which reuses the backend) extra bundles a prebuilt libpq wheel so pip install 'nao-core[postgres]' works out of the box.

Reproduced both before and after: pre-fix PostgresConfig.check_connection returns False and execute_sql raises; post-fix both succeed
and return correct rows for SELECT / aggregation / GROUP BY against a Postgres 16 container.

Changes:

  • cli/pyproject.toml: add psycopg[binary]>=3.2.0 to postgres and redshift extras
  • cli/uv.lock: regenerated

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

URL https://pr-633-81d4f1e.preview.getnao.io
Commit 81d4f1e

⚠️ No LLM API keys configured - you'll see the API key setup flow when trying to chat.


Preview will be automatically removed when this PR is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] PostgreSQL regression in v0.1.0 — works on v0.0.56, fails on v0.1.0

1 participant