pg-conninfo-accepts-flag-envvar-or-both

IN premise

PostgreSQL connection is configured via `--pg`/`--project-id` CLI flags or `REASONS_PG_CONNINFO`/`REASONS_PROJECT_ID` environment variables, with CLI flags taking precedence over env vars — `_backend_kwargs(args)` handles the dispatch.

Summary

PostgreSQL connection details can be provided either through command-line flags or environment variables, and if both are supplied, the command-line flags win. This means users can set defaults via environment variables but override them on a per-invocation basis, with the routing logic centralized in a single dispatch function.

Details

Sourceentries/2026/05/10/postgresql-backend-support.md