Update module github.com/lib/pq to v1.12.3 #7

Open
renovate-bot wants to merge 1 commit from renovate/github.com-lib-pq-1.x into main
Collaborator

This PR contains the following updates:

Package Type Update Change
github.com/lib/pq require minor v1.11.2v1.12.3

Release Notes

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

v1.12.3

Compare Source

  • Send datestyle startup parameter, improving compatbility with database engines
    that use a different default datestyle such as EnterpriseDB (#​1312).

v1.12.2

Compare Source

  • Treat io.ErrUnexpectedEOF as driver.ErrBadConn so database/sql discards the
    connection. Since v1.12.0 this could result in permanently broken connections,
    especially with CockroachDB which frequently sends partial messages (#​1299).

v1.12.1

Compare Source

  • Look for pgpass file in ~/.pgpass instead of ~/.postgresql/pgpass (#​1300).

  • Don't clear password if directly set on pq.Config (#​1302).

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: (UTC)

  • 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 Mend Renovate.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/lib/pq](https://github.com/lib/pq) | require | minor | `v1.11.2` → `v1.12.3` | --- ### Release Notes <details> <summary>lib/pq (github.com/lib/pq)</summary> ### [`v1.12.3`](https://github.com/lib/pq/blob/HEAD/CHANGELOG.md#v1123-2026-04-03) [Compare Source](https://github.com/lib/pq/compare/v1.12.2...v1.12.3) - Send datestyle startup parameter, improving compatbility with database engines that use a different default datestyle such as EnterpriseDB ([#&#8203;1312]). [#&#8203;1312]: https://github.com/lib/pq/pull/1312 ### [`v1.12.2`](https://github.com/lib/pq/blob/HEAD/CHANGELOG.md#v1122-2026-04-02) [Compare Source](https://github.com/lib/pq/compare/v1.12.1...v1.12.2) - Treat io.ErrUnexpectedEOF as driver.ErrBadConn so database/sql discards the connection. Since v1.12.0 this could result in permanently broken connections, especially with CockroachDB which frequently sends partial messages ([#&#8203;1299]). [#&#8203;1299]: https://github.com/lib/pq/pull/1299 ### [`v1.12.1`](https://github.com/lib/pq/blob/HEAD/CHANGELOG.md#v1121-2026-03-30) [Compare Source](https://github.com/lib/pq/compare/v1.12.0...v1.12.1) - Look for pgpass file in \~/.pgpass instead of \~/.postgresql/pgpass ([#&#8203;1300]). - Don't clear password if directly set on pq.Config ([#&#8203;1302]). [#&#8203;1300]: https://github.com/lib/pq/pull/1300 [#&#8203;1302]: https://github.com/lib/pq/pull/1302 ### [`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**: (UTC) - 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 [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjE1MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Update module github.com/lib/pq to v1.12.3
Some checks failed
renovate/artifacts Artifact file update failure
ef04449ae7
Author
Collaborator

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
spawn go ENOENT
### ⚠️ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: go.sum ``` spawn go ENOENT ```
Some checks failed
renovate/artifacts Artifact file update failure
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/github.com-lib-pq-1.x:renovate/github.com-lib-pq-1.x
git switch renovate/github.com-lib-pq-1.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff renovate/github.com-lib-pq-1.x
git switch renovate/github.com-lib-pq-1.x
git rebase main
git switch main
git merge --ff-only renovate/github.com-lib-pq-1.x
git switch renovate/github.com-lib-pq-1.x
git rebase main
git switch main
git merge --no-ff renovate/github.com-lib-pq-1.x
git switch main
git merge --squash renovate/github.com-lib-pq-1.x
git switch main
git merge --ff-only renovate/github.com-lib-pq-1.x
git switch main
git merge renovate/github.com-lib-pq-1.x
git push origin main
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
unurled/cnampagnon-go!7
No description provided.