Skip to content

feat: synchronous Psycopg 3 support via the psycopg_sync driver#222

Merged
rayakame merged 7 commits into
mainfrom
feat/psycopg-sync
Jul 24, 2026
Merged

feat: synchronous Psycopg 3 support via the psycopg_sync driver#222
rayakame merged 7 commits into
mainfrom
feat/psycopg-sync

Conversation

@rayakame

Copy link
Copy Markdown
Owner

Adds the synchronous flavor of the Psycopg 3 driver: sql_driver: "psycopg_sync" generates plain synchronous code for psycopg with full command parity to psycopg_async - :one, :many, :exec, :execresult, :execrows, and :copyfrom (streamed through a synchronous cursor.copy()). :execlastid stays unsupported, as on the other PostgreSQL drivers.

with psycopg.connect("postgresql://...") as conn:
    user = queries.get_user(conn, id_=1)
    users = queries.list_users(conn)()   # :many - call instead of await
    for user in queries.list_users(conn):
        ...

One implementation, two flavors. psycopgBase is now parameterized by an async flag - the sqlite_base.go pattern - since psycopg's sync API mirrors the async one method for method. The sync flavor emits psycopg.Connection[psycopg.rows.TupleRow] / psycopg.Cursor annotations, drops await/async with, and its :one collapses to a plain chained conn.execute(...).fetchone(). The async flavor's output is byte-identical to before (all four existing fixture trees pass sqlc diff under the rebuilt wasm).

Shared psycopg contract. Everything flavor-independent is reused as-is via a new SQLDriver.IsPsycopg() helper: the %(pN)s placeholder rewrite, named-dict binding, typing.Final[typing.LiteralString] constants, the json/jsonb raw-text loader registration, reserved generated locals, and the QueryResults named-params variant (sync gets __call__/__iter__/__next__ instead of __await__/__aiter__/__anext__).

Testing. New test/driver_psycopg_sync tree with the full model-type matrix plus omit_tc, generated fixtures checked by pyright strict + ruff, sync emission goldens in Go, and all ten runtime pytest suites ported to sync style (full suite: 2367 passed). The shared-table id constant for the persistent test_invalid_identifiers/3rd_party_stats tables gets its own per-tree value (806060), and the shared postgres session cleanup now also covers the enum tables.

Docs: drivers guide section, getting-started tabs, feature-support matrix (including a sync prepare_threshold example), configuration references, README.

rayakame added 2 commits July 24, 2026 01:55
Parameterize psycopgBase by an async flag - the sqlite_base pattern - so
both psycopg flavors share one implementation: the sync flavor emits plain
functions, psycopg.Connection/Cursor annotations, a called-not-awaited
QueryResults, and :copyfrom via a synchronous cursor.copy(). Widen every
psycopg gate (SQL rewrite, reserved locals, LiteralString constants,
imports, docstrings) through a new SQLDriver.IsPsycopg helper, add the
test/driver_psycopg_sync fixture tree with ported runtime suites, and wire
up nox sessions, CI, build scripts, docs, and the shared postgres cleanup.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds the psycopg_sync SQL driver with shared synchronous/asynchronous Psycopg code generation, placeholder rewriting, imports, query results, COPY FROM, and type-checking behavior. Adds PostgreSQL schemas, queries, configuration, fixtures, and integration tests across supported model styles. Updates CI, build checksum propagation, release metadata, README, and documentation to describe and validate the new driver.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 1.81% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding synchronous Psycopg 3 support via the new psycopg_sync driver.
Description check ✅ Passed The description directly matches the changeset and explains the new sync driver, behavior, tests, and docs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-24 16:50 UTC

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rayakame

Copy link
Copy Markdown
Owner Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

@rayakame, I’ll perform a complete review of all changes in this PR.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 1 minute.

@rayakame

Copy link
Copy Markdown
Owner Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

@rayakame, I’ll perform a complete review of all changes in this PR.

✅ Action performed

Full review finished.

@rayakame

Copy link
Copy Markdown
Owner Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

@rayakame, I’ll perform a complete review of all changes in this PR.

✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 55 minutes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 341: Remove the spaces immediately inside the inline needs sequence in
the workflow’s needs declaration, preserving all listed job dependencies and
comma spacing so the YAML passes lint.

In `@test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_classes.py`:
- Around line 43-53: Extract the duplicated _NoRowCursor and _NoRowConn stubs
into one shared test helper, preserving fetchone returning None and execute
returning the no-row cursor. In
test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_classes.py#L43-L53,
test/driver_psycopg_sync/dataclass/test_psycopg_sync_dataclass_classes.py#L44-L54,
and test/driver_psycopg_sync/omit_tc/test_omit_typechecking_runtime.py#L52-L62,
remove the local definitions and import the shared helper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8fec8cac-3f1c-4c7f-b164-2123d96b5fd8

📥 Commits

Reviewing files that changed from the base of the PR and between 60184a3 and 4955570.

⛔ Files ignored due to path filters (78)
  • test/driver_aiosqlite/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_asyncpg/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_psycopg_async/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_psycopg_sync/attrs/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_converters.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_sqlite3/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
📒 Files selected for processing (66)
  • .changes/unreleased/Added-20260724-120000.yaml
  • .github/workflows/ci.yml
  • README.md
  • docs/content/_index.md
  • docs/content/docs/_index.md
  • docs/content/docs/getting-started.md
  • docs/content/docs/guide/configuration.md
  • docs/content/docs/guide/drivers.md
  • docs/content/docs/guide/enums.md
  • docs/content/docs/guide/writing-queries.md
  • docs/content/docs/reference/configuration-options.md
  • docs/content/docs/reference/feature-support.md
  • internal/config/constants.go
  • internal/config/constants_test.go
  • internal/driver/asyncpg.go
  • internal/driver/common.go
  • internal/driver/driver.go
  • internal/driver/driver_test.go
  • internal/driver/psycopg.go
  • internal/driver/psycopg_test.go
  • internal/render/imports.go
  • internal/render/imports_test.go
  • internal/render/queries.go
  • internal/render/render_queries_test.go
  • internal/transform/queries.go
  • internal/transform/queries_test.go
  • internal/writer/docstrings.go
  • internal/writer/docstrings_test.go
  • noxfile.py
  • scripts/build/build.bat
  • scripts/build/build.sh
  • sqlc.yaml
  • test/conftest.py
  • test/driver_aiosqlite/sqlc.yaml
  • test/driver_asyncpg/sqlc.yaml
  • test/driver_psycopg_async/sqlc.yaml
  • test/driver_psycopg_sync/__init__.py
  • test/driver_psycopg_sync/attrs/__init__.py
  • test/driver_psycopg_sync/attrs/ruff.toml
  • test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_classes.py
  • test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_functions.py
  • test/driver_psycopg_sync/dataclass/__init__.py
  • test/driver_psycopg_sync/dataclass/ruff.toml
  • test/driver_psycopg_sync/dataclass/test_psycopg_sync_dataclass_classes.py
  • test/driver_psycopg_sync/dataclass/test_psycopg_sync_dataclass_functions.py
  • test/driver_psycopg_sync/msgspec/__init__.py
  • test/driver_psycopg_sync/msgspec/ruff.toml
  • test/driver_psycopg_sync/msgspec/test_psycopg_sync_msgspec_classes.py
  • test/driver_psycopg_sync/msgspec/test_psycopg_sync_msgspec_functions.py
  • test/driver_psycopg_sync/omit_tc/__init__.py
  • test/driver_psycopg_sync/omit_tc/ruff.toml
  • test/driver_psycopg_sync/omit_tc/test_omit_typechecking_import.py
  • test/driver_psycopg_sync/omit_tc/test_omit_typechecking_runtime.py
  • test/driver_psycopg_sync/pydantic/__init__.py
  • test/driver_psycopg_sync/pydantic/ruff.toml
  • test/driver_psycopg_sync/pydantic/test_psycopg_sync_pydantic_classes.py
  • test/driver_psycopg_sync/pydantic/test_psycopg_sync_pydantic_functions.py
  • test/driver_psycopg_sync/queries.sql
  • test/driver_psycopg_sync/queries_converters.sql
  • test/driver_psycopg_sync/queries_copy_override.sql
  • test/driver_psycopg_sync/queries_enum_override.sql
  • test/driver_psycopg_sync/queries_field_namings.sql
  • test/driver_psycopg_sync/queries_invalid_identifiers.sql
  • test/driver_psycopg_sync/schema.sql
  • test/driver_psycopg_sync/sqlc.yaml
  • test/driver_sqlite3/sqlc.yaml

Comment thread .github/workflows/ci.yml Outdated
Comment thread test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_classes.py Outdated
Deduplicate the no-row connection stubs from all nine sync test files
into a shared test/driver_psycopg_sync/no_row_conn.py helper, and drop
the yamllint-offending spaces inside the ci-done needs brackets.
@rayakame

Copy link
Copy Markdown
Owner Author

@coderabbitai full-review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

@rayakame, I’ll perform a complete review of all changes in this PR.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changes/unreleased/Added-20260724-120000.yaml:
- Line 2: Update the release-note body for psycopg_sync to qualify that it
supports the same supported commands as psycopg_async, or explicitly state that
:execlastid is excluded; keep the remaining feature description unchanged.

In `@docs/content/docs/getting-started.md`:
- Around line 41-50: Update the Psycopg installation commands in both the
psycopg_async and psycopg_sync tabs to require Psycopg version 3.2 or newer,
matching the documented and package metadata minimum.

In `@test/driver_psycopg_sync/dataclass/test_psycopg_sync_dataclass_functions.py`:
- Line 779: Update the inline suppression on the total assertion in the
dataclass test to use valid Ruff syntax, specifically noqa: PLR2004 or ruff:
ignore[PLR2004], while preserving the assertion and its expected value.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b6e738ff-22cf-4a7c-bb52-6f39fbf32631

📥 Commits

Reviewing files that changed from the base of the PR and between 60184a3 and f5ce0b8.

⛔ Files ignored due to path filters (78)
  • test/driver_aiosqlite/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_asyncpg/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_psycopg_async/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_psycopg_sync/attrs/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/attrs/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/attrs/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/dataclass/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_converters.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/dataclass/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/msgspec/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/msgspec/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/omit_tc/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/omit_tc/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/classes/__init__.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/enums.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/models.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_copy_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_enum_override.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_field_namings.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/classes/queries_invalid_identifiers.py is excluded by !test/driver_*/*/classes/**
  • test/driver_psycopg_sync/pydantic/functions/__init__.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/enums.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/models.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_copy_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_enum_override.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_field_namings.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/pydantic/functions/queries_invalid_identifiers.py is excluded by !test/driver_*/*/functions/**
  • test/driver_psycopg_sync/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
  • test/driver_sqlite3/sqlc-gen-better-python.wasm is excluded by !**/*.wasm, !**/*.wasm
📒 Files selected for processing (67)
  • .changes/unreleased/Added-20260724-120000.yaml
  • .github/workflows/ci.yml
  • README.md
  • docs/content/_index.md
  • docs/content/docs/_index.md
  • docs/content/docs/getting-started.md
  • docs/content/docs/guide/configuration.md
  • docs/content/docs/guide/drivers.md
  • docs/content/docs/guide/enums.md
  • docs/content/docs/guide/writing-queries.md
  • docs/content/docs/reference/configuration-options.md
  • docs/content/docs/reference/feature-support.md
  • internal/config/constants.go
  • internal/config/constants_test.go
  • internal/driver/asyncpg.go
  • internal/driver/common.go
  • internal/driver/driver.go
  • internal/driver/driver_test.go
  • internal/driver/psycopg.go
  • internal/driver/psycopg_test.go
  • internal/render/imports.go
  • internal/render/imports_test.go
  • internal/render/queries.go
  • internal/render/render_queries_test.go
  • internal/transform/queries.go
  • internal/transform/queries_test.go
  • internal/writer/docstrings.go
  • internal/writer/docstrings_test.go
  • noxfile.py
  • scripts/build/build.bat
  • scripts/build/build.sh
  • sqlc.yaml
  • test/conftest.py
  • test/driver_aiosqlite/sqlc.yaml
  • test/driver_asyncpg/sqlc.yaml
  • test/driver_psycopg_async/sqlc.yaml
  • test/driver_psycopg_sync/__init__.py
  • test/driver_psycopg_sync/attrs/__init__.py
  • test/driver_psycopg_sync/attrs/ruff.toml
  • test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_classes.py
  • test/driver_psycopg_sync/attrs/test_psycopg_sync_attrs_functions.py
  • test/driver_psycopg_sync/dataclass/__init__.py
  • test/driver_psycopg_sync/dataclass/ruff.toml
  • test/driver_psycopg_sync/dataclass/test_psycopg_sync_dataclass_classes.py
  • test/driver_psycopg_sync/dataclass/test_psycopg_sync_dataclass_functions.py
  • test/driver_psycopg_sync/msgspec/__init__.py
  • test/driver_psycopg_sync/msgspec/ruff.toml
  • test/driver_psycopg_sync/msgspec/test_psycopg_sync_msgspec_classes.py
  • test/driver_psycopg_sync/msgspec/test_psycopg_sync_msgspec_functions.py
  • test/driver_psycopg_sync/no_row_conn.py
  • test/driver_psycopg_sync/omit_tc/__init__.py
  • test/driver_psycopg_sync/omit_tc/ruff.toml
  • test/driver_psycopg_sync/omit_tc/test_omit_typechecking_import.py
  • test/driver_psycopg_sync/omit_tc/test_omit_typechecking_runtime.py
  • test/driver_psycopg_sync/pydantic/__init__.py
  • test/driver_psycopg_sync/pydantic/ruff.toml
  • test/driver_psycopg_sync/pydantic/test_psycopg_sync_pydantic_classes.py
  • test/driver_psycopg_sync/pydantic/test_psycopg_sync_pydantic_functions.py
  • test/driver_psycopg_sync/queries.sql
  • test/driver_psycopg_sync/queries_converters.sql
  • test/driver_psycopg_sync/queries_copy_override.sql
  • test/driver_psycopg_sync/queries_enum_override.sql
  • test/driver_psycopg_sync/queries_field_namings.sql
  • test/driver_psycopg_sync/queries_invalid_identifiers.sql
  • test/driver_psycopg_sync/schema.sql
  • test/driver_psycopg_sync/sqlc.yaml
  • test/driver_sqlite3/sqlc.yaml

Comment thread .changes/unreleased/Added-20260724-120000.yaml Outdated
Comment thread docs/content/docs/getting-started.md Outdated
Qualify the changelog body to say the same supported commands with
:execlastid excluded, and pin the psycopg install tabs to the documented
minimum of psycopg 3.2.
@rayakame
rayakame enabled auto-merge (squash) July 24, 2026 16:40
@rayakame
rayakame merged commit 08cd995 into main Jul 24, 2026
21 checks passed
@rayakame
rayakame deleted the feat/psycopg-sync branch July 24, 2026 16:51
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.

1 participant