Skip to content

Clarify Postgres IP restriction CLI help text and table header - #1560

Open
mscoutermarsh wants to merge 1 commit into
mainfrom
cursor/fix-postgres-ip-restriction-help-5510
Open

mscoutermarsh wants to merge 1 commit into
mainfrom
cursor/fix-postgres-ip-restriction-help-5510

Conversation

@mscoutermarsh

Copy link
Copy Markdown
Member

Updates the help text and human-readable table header for pscale database ip-restriction commands so they accurately describe PostgreSQL database matching, allowlist semantics, and branch-wide scope.

Details

Decisions made

  • Flag and API stability: Kept --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 (database instead of schema) changed.
  • --schema and --role wording: Updated help text in ip-restriction, create, and update to clarify that --schema matches the PostgreSQL logical database name in the connection startup packet (not a schema within a database), and that --role and --schema specify what a rule allows rather than restricts.
  • Allowlist and branch scope: Documented across ip-restriction, list, create, update, and delete that 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

  • Existing tests in internal/cmd/database/ip_restriction_test.go (go test -count=1 ./internal/cmd/database/...) and internal/planetscale (go test ./internal/planetscale/...) pass, along with go vet ./....
  • No new tests were added because this change updates copy and a human table header tag without changing command logic, flag parsing, or API serialization.
  • Built pscale and manually verified rendered --help output for pscale database ip-restriction and its create, update, delete, list, and show subcommands.

What was skipped and risks

  • Skipped: Left ip-restriction show help text unchanged (its short description has no inaccuracies), left IPRestrictionEntry Go field name / JSON tag / CSV header as Schema / schema to avoid breaking JSON/CSV consumers, and did not run the full cross-package test suite outside internal/cmd/database and internal/planetscale.
  • Risks: Any external script scraping the human-readable table header of pscale database ip-restriction list|show|create|update for SCHEMA instead of using --format json would now see DATABASE.
Open in Web Open in Cursor 

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
mscoutermarsh marked this pull request as ready for review December 1, 2026 23:21
@mscoutermarsh
mscoutermarsh requested a review from a team as a code owner December 1, 2026 23:21

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Risk: low. Approved. Cursor Bugbot completed with no findings that need human review; Cursor Security Agent was not present. This is help-text and table-header wording only, with no runtime behavior change.

Open in Web View Automation 

Sent by Cursor Approval Agent: cli-reviewer

This branch has not been deployed

No deployments
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.

3 participants