Repository navigation
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdairs
force-pushed
the
codex/postgres-query-endpoint
branch
from
October 1, 2026 17:24
fe4dd24 to
b208424
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.
Add
cloud postgres queryso users can run read-only SQL without installing psql or supplying database credentials. For example:clickhousectl cloud postgres query <id> --query 'SELECT version()'.Supports service ID or exact name, organization selection,
--query/-q,--queries-file(including-), piped stdin, and--database. Human output streams tab-separated columns; JSON and agent output preserve the endpoint's compact array stream, including names and types. API-key authentication fails before input or HTTP with OAuth guidance. Query failures never trigger retries, credential provisioning, or a native-client fallback.Closes #1023. This PR is stacked on #1024, the separate API-library implementation; merge that first, then retarget this PR to main.
Control-plane #41025 merged on September 28. Production Postgres query support was verified live on September 29 with clickhousectl OAuth credentials. API-key access remains unsupported.
Validation:
cargo fmt --all --checkcargo clippy -p clickhousectl -- -D warningscargo test -p clickhousectlcargo check -p clickhousectl --no-default-featurescargo clippy -p clickhousectl --all-targets --no-default-features -- -D warningsLive 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.