Skip to content

Merge lib/pq upstream (139 commits)#1322

Closed
acoshift wants to merge 7 commits into
lib:masterfrom
moonrhythm:claude/suspicious-williamson-8adb76
Closed

Merge lib/pq upstream (139 commits)#1322
acoshift wants to merge 7 commits into
lib:masterfrom
moonrhythm:claude/suspicious-williamson-8adb76

Conversation

@acoshift
Copy link
Copy Markdown
Contributor

Summary

Merges 139 commits from lib/pq upstream (upstream/master) into this fork, bringing in the context-support refactor, NamedValueChecker, internal/pgpass extraction, modern Docker-based CI, pqerror package, Config-based options, multi-host/load-balancing, require_auth, SNI/SSL improvements, and many test refactors.

Conflict resolutions

All fork customizations were either already incorporated upstream or made obsolete by upstream's refactors — upstream's version won every content conflict:

  • conn.go / conn_test.go — fork's pgpass fix (Fix handlePgpass #1120/ce86388) and NamedValueChecker support (ensure we pass the user and password #2/cbd59e2, Add support for NamedValueChecker interface #1125/402d43b) are now native upstream. pgpass handling moved to internal/pgpass/pgpass.go; CheckNamedValue is at conn.go:863.
  • go.mod — bumped from go 1.20 to upstream's go 1.23.
  • .github/workflows/test.yml — replaced fork's inline-cert legacy setup with upstream's docker compose + testdata/ CI matrix (PG 14–18, Go 1.23/1.26, pgbouncer, CockroachDB).
  • array_test.go / encode_test.go / ssl.go / ssl_test.go — accepted upstream's table-driven rewrites and Config-based API.
  • Deleted by upstream:
    • .github/workflows/codeql-analysis.yml (superseded by staticcheck.yml)
    • conn_go18.go (refactored away by the context-support overhaul)
  • Manually deleted post-merge (duplicates git couldn't flag because they didn't exist at the merge base):
    • conn_go19.goCheckNamedValue now lives in conn.go
    • conn_go19_test.goTestArrayArg is now TestArrayParameter in array_test.go

NullTime

Upstream kept NullTime as a deprecated alias (type NullTime = sql.NullTime). Fork PR #3 removed it entirely; that decision is preserved via a follow-up commit (c910a05) that drops the alias from deprecated.go.

Verification

  • go build ./... — clean
  • go vet ./... — clean
  • go test -run=DontRunAnyTests ./... — all test packages compile (integration tests require a running Postgres)
  • auth/kerberos submodule — builds clean

Test plan

  • CI passes against PG 14–18 + pgbouncer + CockroachDB
  • Spot-check any internal consumer that imported pq.NullTime (now removed)
  • Spot-check consumers that relied on Query/Exec (non-Context) on conn — upstream removed these from the public surface

🤖 Generated with Claude Code

acoshift and others added 7 commits April 16, 2023 16:32
…-williamson-8adb76

# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	.github/workflows/test.yml
#	array_test.go
#	conn.go
#	conn_go18.go
#	conn_test.go
#	encode_test.go
#	go.mod
#	ssl.go
#	ssl_test.go
Upstream lib/pq kept NullTime as a deprecated alias for sql.NullTime.
This repository previously removed NullTime entirely in #3, so drop it
again after the merge to preserve that decision.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@acoshift
Copy link
Copy Markdown
Contributor Author

Sorry, wrong repository — meant to target the moonrhythm/pq fork.

@acoshift acoshift closed this May 17, 2026
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.

2 participants