Conversation
sdairs
added this pull request to stack #1026
September 27, 2026 11:59
sdairs
marked this pull request as ready for review
September 29, 2026 17:49
sdairs
force-pushed
the
codex/1023-postgres-query-api
branch
from
October 1, 2026 17:24
034d3a7 to
a152bae
Compare
sdairs
removed this pull request from stack #1026
October 1, 2026 17:26
sdairs
added this pull request to stack #1001
October 1, 2026 17:27
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Postgres queries currently require a native client and database credentials. Add
Client::run_postgres_query_bearerandRunPostgresQueryRequestfor the non-OpenAPI/service/{serviceId}/runPostgres?orgId=...route, using the existing query-host selection policy.The helper sends OAuth Bearer credentials, rejects API-key clients before HTTP, and returns the gzip-decoded response for streaming. SQL and HTTP failures retain their existing typed classification. The fixed response format is
JSONCompactEachRowWithNamesAndTypes; requests are never retried or provisioned. Includes an analyzer exemption, documentation, offline contract tests, and an ignored live smoke test against an existing service.Refs #1023. CLI exposure is implemented separately in #1025, stacked on this branch.
Control-plane #41025 merged on September 28. Production Postgres query support was verified live on September 29 with clickhousectl OAuth credentials. API-key clients remain unsupported.
Validation:
cargo fmt --all --checkcargo clippy -p clickhouse-cloud-api -p clickhouse-openapi-analyzer --all-targets -- -D warningscargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzerpython3 -m unittest discover -s scripts/tests -p 'test_*.py'Live validation (2026-09-29, existing evaluation service; no persistent database changes):
live_postgres_query_bearer_smokepassed with bothpostgresand an existing non-default database.current_user = chpg_console_readonly.CREATE TABLEprobe was rejected withpermission denied for schema public(CLIsql_error, exit 1).auth_required, exit 4).No implementation fixes were needed. Updated only the documentation to remove the resolved deployment caveat; formatting and diff checks passed. Draft status is retained. The broader repository Cloud integration CI gate is separate from this direct OAuth verification.