Repository navigation
Clarify Postgres IP restriction CLI help text and table header - #1560
Open
mscoutermarsh wants to merge 1 commit into
Open
mscoutermarsh wants to merge 1 commit into
mscoutermarsh wants to merge 1 commit into
Conversation
Clarify the help text and human table header for `pscale database ip-restriction` subcommands to accurately describe how PostgreSQL IP restriction rules work: - Clarify that `--schema` matches the PostgreSQL logical database name from the connection startup packet (not a schema within a database), and label the human table column `database` instead of `schema`. - Document allowlist semantics: with no rules all connections are allowed; when any rule exists, connections must match at least one rule, and role-scoped rules do not allow other roles unless another rule matches them. - Clarify that rules apply to all branches (including future branches), cannot be scoped to a single branch, and deleting a rule removes the access it granted (deleting the last rule allows all IPs on all branches). Co-authored-by: Mike Coutermarsh <coutermarsh.mike@gmail.com>
mscoutermarsh
marked this pull request as ready for review
December 1, 2026 23:21
no-itsbackpack
approved these changes
Dec 1, 2026
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.


Updates the help text and human-readable table header for
pscale database ip-restrictioncommands so they accurately describe PostgreSQL database matching, allowlist semantics, and branch-wide scope.Details
Decisions made
--schema,--role, API request/response payloads, JSON serialization ("schema"), and CSV column names (Schema) unchanged; only user-facing CLI help text and the human table header (databaseinstead ofschema) changed.--schemaand--rolewording: Updated help text inip-restriction,create, andupdateto clarify that--schemamatches the PostgreSQL logical database name in the connection startup packet (not a schema within a database), and that--roleand--schemaspecify what a rule allows rather than restricts.ip-restriction,list,create,update, anddeletethat rules form an allowlist applying to all branches (including future branches), cannot be scoped to a single branch, and that deleting a rule removes the access it granted while deleting the last remaining rule allows connections from all IPs on all branches.Testing
internal/cmd/database/ip_restriction_test.go(go test -count=1 ./internal/cmd/database/...) andinternal/planetscale(go test ./internal/planetscale/...) pass, along withgo vet ./....pscaleand manually verified rendered--helpoutput forpscale database ip-restrictionand itscreate,update,delete,list, andshowsubcommands.What was skipped and risks
ip-restriction showhelp text unchanged (its short description has no inaccuracies), leftIPRestrictionEntryGo field name / JSON tag / CSV header asSchema/schemato avoid breaking JSON/CSV consumers, and did not run the full cross-package test suite outsideinternal/cmd/databaseandinternal/planetscale.pscale database ip-restriction list|show|create|updateforSCHEMAinstead of using--format jsonwould now seeDATABASE.