GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(postgres): honour a URL's options, and each server's own sslmode by jasdeepkhalsa · Pull Request #258 · DBDiff/DBDiff

Conversation

@jasdeepkhalsa

@jasdeepkhalsa jasdeepkhalsa commented Oct 10, 2026

Copy link
Copy Markdown
Member

URL options were dropped. ?options=-c default_transaction_read_only=on -c statement_timeout=… is how a connection string asks for session settings. psql, pg_dump and libpq clients honour it, but Laravel's connector builds its own DSN with no place for it, so DBDiff dropped it. A source made read-only through its URL, the usual guard on a production connection, was an ordinary session for DBDiff.

Now each -c name=value (or --name=value) is applied with set_config() as soon as the connection is made, with the values bound, and again when a connection is rebuilt for another schema. PostgresSessionOptions::parse follows libpq's quoting rules (backslash escapes, dashes for underscores). When DBDiff runs pg_dump, it passes the same settings through PGOPTIONS.

sslmode applied to both servers. The source URL's sslmode was applied to both connections, and the target URL's own was ignored. Each server now keeps its own. --supabase and --sslmode only fill in where a URL doesn't name one.

Tests

  • tests/Unit/PostgresSessionOptionsTest: parsing, and per-server sslmode/options from toServerAndDb.
  • UrlSessionOptionsPostgresTest: on a live server, the source session reports the URL's default_transaction_read_only=on and statement_timeout, the target keeps its own, and the settings survive useSchema().
  • Both fail on master. Related suites (DsnParser, connection config, CLI getter, diff command) pass: 83 tests.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jasdeepkhalsa @claude
fix(postgres): honour a URL's options, and each server's own sslmode
d5dab09
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added bug php Pull requests that update php code postgres Related to Postgres labels Oct 10, 2026
@jasdeepkhalsa @claude
refactor: simpler options parser; DBManager keeps its method count
eb366d9
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sonarqubecloud

sonarqubecloud Bot commented Oct 10, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasdeepkhalsa
jasdeepkhalsa merged commit 4a4ba6d into master Oct 10, 2026
76 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug php Pull requests that update php code postgres Related to Postgres

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@jasdeepkhalsa
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.