Update module github.com/lib/pq to v1.12.0 #14

Merged
pieter merged 1 commit from renovate/github.com-lib-pq-1.x into main 2026-03-18 16:02:57 +01:00
Collaborator

This PR contains the following updates:

Package Change Age Confidence
github.com/lib/pq v1.11.2v1.12.0 age confidence

Release Notes

lib/pq (github.com/lib/pq)

v1.12.0

Compare Source

  • The next release may change the default sslmode from require to prefer.
    See #​1271 for details.

  • CopyIn() and CopyInToSchema() have been marked as deprecated. These are
    simple query builders and not needed for COPY [..] FROM STDIN support (which
    is not deprecated). (#​1279)

    // Old
    tx.Prepare(CopyIn("temp", "num", "text", "blob", "nothing"))
    
    // Replacement
    tx.Prepare(`copy temp (num, text, blob, nothing) from stdin`)
    
Features
  • Support protocol 3.2, and the min_protocol_version and
    max_protocol_version DSN parameters (#​1258).

  • Support sslmode=prefer and sslmode=allow (#​1270).

  • Support ssl_min_protocol_version and ssl_max_protocol_version (#​1277).

  • Support connection service file to load connection details (#​1285).

  • Support sslrootcert=system and use ~/.postgresql/root.crt as the default
    value of sslrootcert (#​1280, #​1281).

  • Add a new pqerror package with PostgreSQL error codes (#​1275).

    For example, to test if an error is a UNIQUE constraint violation:

    if pqErr, ok := errors.AsType[*pq.Error](err); ok && pqErr.Code == pqerror.UniqueViolation {
        log.Fatalf("email %q already exsts", email)
    }
    

    To make this a bit more convenient, it also adds a pq.As() function:

    pqErr := pq.As(err, pqerror.UniqueViolation)
    if pqErr != nil {
        log.Fatalf("email %q already exsts", email)
    }
    
Fixes
  • Fix SSL key permission check to allow modes stricter than 0600/0640#1265 (#​1265).

  • Fix Hstore to work with binary parameters (#​1278).

  • Clearer error when starting a new query while pq is still processing another
    query (#​1272).

  • Send intermediate CAs with client certificates, so they can be signed by an
    intermediate CA (#​1267).

  • Use time.UTC for UTC aliases such as Etc/UTC (#​1282).


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/lib/pq](https://github.com/lib/pq) | `v1.11.2` → `v1.12.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2flib%2fpq/v1.12.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2flib%2fpq/v1.11.2/v1.12.0?slim=true) | --- ### Release Notes <details> <summary>lib/pq (github.com/lib/pq)</summary> ### [`v1.12.0`](https://github.com/lib/pq/blob/HEAD/CHANGELOG.md#v1120-2026-03-18) [Compare Source](https://github.com/lib/pq/compare/v1.11.2...v1.12.0) - The next release may change the default sslmode from `require` to `prefer`. See [#&#8203;1271] for details. - `CopyIn()` and `CopyInToSchema()` have been marked as deprecated. These are simple query builders and not needed for `COPY [..] FROM STDIN` support (which is *not* deprecated). ([#&#8203;1279]) ``` // Old tx.Prepare(CopyIn("temp", "num", "text", "blob", "nothing")) // Replacement tx.Prepare(`copy temp (num, text, blob, nothing) from stdin`) ``` ##### Features - Support protocol 3.2, and the `min_protocol_version` and `max_protocol_version` DSN parameters ([#&#8203;1258]). - Support `sslmode=prefer` and `sslmode=allow` ([#&#8203;1270]). - Support `ssl_min_protocol_version` and `ssl_max_protocol_version` ([#&#8203;1277]). - Support connection service file to load connection details ([#&#8203;1285]). - Support `sslrootcert=system` and use `~/.postgresql/root.crt` as the default value of sslrootcert ([#&#8203;1280], [#&#8203;1281]). - Add a new `pqerror` package with PostgreSQL error codes ([#&#8203;1275]). For example, to test if an error is a UNIQUE constraint violation: ``` if pqErr, ok := errors.AsType[*pq.Error](err); ok && pqErr.Code == pqerror.UniqueViolation { log.Fatalf("email %q already exsts", email) } ``` To make this a bit more convenient, it also adds a `pq.As()` function: ``` pqErr := pq.As(err, pqerror.UniqueViolation) if pqErr != nil { log.Fatalf("email %q already exsts", email) } ``` ##### Fixes - Fix SSL key permission check to allow modes stricter than [0600/0640#1265](https://github.com/0600/0640/issues/1265) ([#&#8203;1265]). - Fix Hstore to work with binary parameters ([#&#8203;1278]). - Clearer error when starting a new query while pq is still processing another query ([#&#8203;1272]). - Send intermediate CAs with client certificates, so they can be signed by an intermediate CA ([#&#8203;1267]). - Use `time.UTC` for UTC aliases such as `Etc/UTC` ([#&#8203;1282]). [#&#8203;1258]: https://github.com/lib/pq/pull/1258 [#&#8203;1265]: https://github.com/lib/pq/pull/1265 [#&#8203;1267]: https://github.com/lib/pq/pull/1267 [#&#8203;1270]: https://github.com/lib/pq/pull/1270 [#&#8203;1271]: https://github.com/lib/pq/pull/1271 [#&#8203;1272]: https://github.com/lib/pq/pull/1272 [#&#8203;1275]: https://github.com/lib/pq/pull/1275 [#&#8203;1277]: https://github.com/lib/pq/pull/1277 [#&#8203;1278]: https://github.com/lib/pq/pull/1278 [#&#8203;1279]: https://github.com/lib/pq/pull/1279 [#&#8203;1280]: https://github.com/lib/pq/pull/1280 [#&#8203;1281]: https://github.com/lib/pq/pull/1281 [#&#8203;1282]: https://github.com/lib/pq/pull/1282 [#&#8203;1283]: https://github.com/lib/pq/pull/1283 [#&#8203;1285]: https://github.com/lib/pq/pull/1285 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41Ny4wIiwidXBkYXRlZEluVmVyIjoiNDMuNTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Update module github.com/lib/pq to v1.12.0
Some checks failed
Build Golang packages / test (pull_request) Failing after 51s
Build Docker image / build (push) Failing after 31s
Build Golang packages / test (push) Failing after 43s
Build Docker image / build (pull_request) Successful in 3m24s
Build Golang packages / release (pull_request) Has been skipped
Build Golang packages / release (push) Has been skipped
e7780cc268
pieter merged commit 75e21f1790 into main 2026-03-18 16:02:57 +01:00
pieter deleted branch renovate/github.com-lib-pq-1.x 2026-03-18 16:02:57 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
energy/opendtu-logger!14
No description provided.