Skip to content

build(deps): Bump github.com/lib/pq from 1.11.2 to 1.12.0 (backport #5713) - #5724

Merged
mergify[bot] merged 3 commits into
v0.38.xfrom
mergify/bp/v0.38.x/pr-5713
Mar 26, 2026
Merged

mergify[bot] merged 3 commits into
v0.38.xfrom
mergify/bp/v0.38.x/pr-5713

Conversation

@mergify

@mergify mergify Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/lib/pq from 1.11.2 to 1.12.0.

Release notes

Sourced from github.com/lib/pq's releases.

v1.12.0

  • 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](https://github.com/lib/pq/blob/HEAD/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).

  • 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 (#1283).

... (truncated)

Changelog

Sourced from github.com/lib/pq's changelog.

v1.12.0 (2026-03-18)

  • 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](https://github.com/lib/pq/blob/master/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/06400600 (#1265).

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

... (truncated)

Commits
  • 42ab0ff Change default sslmode from "require" to "prefer"
  • 6d40f13 Release v1.12.0
  • 386fc0e Document NULL behaviour with COPY
  • a62682e Better staticcheck cache 2
  • 87ee06c Better staticcheck cache
  • 0962458 Rewrite tests to use pqerror, pq.As()
  • 0d20981 Don't move pq.Error to pqerror.Error
  • 4332138 Add pqerror package
  • 620d6d5 Make tests run faster
  • dc8ff5d Implement connection service file
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

This is an automatic backport of pull request #5713 done by [Mergify](https://mergify.com).

Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.11.2 to
1.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lib/pq/releases">github.com/lib/pq's
releases</a>.</em></p>
<blockquote>
<h2>v1.12.0</h2>
<ul>
<li>
<p>The next release may change the default sslmode from
<code>require</code> to <code>prefer</code>. See <a
href="https://redirect.github.com/lib/pq/issues/1271">#1271</a> for
details.</p>
</li>
<li>
<p><code>CopyIn()</code> and <code>CopyInToSchema()</code> have been
marked as deprecated. These are simple query builders and not needed for
<code>COPY [..] FROM STDIN</code> support (which is <em>not</em>
deprecated). (<a
href="https://redirect.github.com/lib/pq/issues/1279">#1279</a>)</p>
<pre><code>// Old
tx.Prepare(CopyIn(&quot;temp&quot;, &quot;num&quot;, &quot;text&quot;,
&quot;blob&quot;, &quot;nothing&quot;))
<p>// Replacement
tx.Prepare(<code>copy temp (num, text, blob, nothing) from stdin</code>)
</code></pre></p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>
<p>Support protocol 3.2, and the <code>min_protocol_version</code> and
<code>max_protocol_version</code> DSN parameters (<a
href="https://redirect.github.com/lib/pq/issues/1258">#1258</a>).</p>
</li>
<li>
<p>Support <code>sslmode=prefer</code> and <code>sslmode=allow</code>
(<a
href="https://redirect.github.com/lib/pq/issues/1270">#1270</a>).</p>
</li>
<li>
<p>Support <code>ssl_min_protocol_version</code> and
<code>ssl_max_protocol_version</code> (<a
href="https://redirect.github.com/lib/pq/issues/1277">#1277</a>).</p>
</li>
<li>
<p>Support connection service file to load connection details (<a
href="https://redirect.github.com/lib/pq/issues/1285">#1285</a>).</p>
</li>
<li>
<p>Support <code>sslrootcert=system</code> and use
<code>~/.postgresql/root.crt</code> as the default value of sslrootcert
(<a href="https://redirect.github.com/lib/pq/issues/1280">#1280</a>, <a
href="https://redirect.github.com/lib/pq/issues/1281">#1281</a>).</p>
</li>
<li>
<p>Add a new <code>pqerror</code> package with PostgreSQL error codes
(<a
href="https://redirect.github.com/lib/pq/issues/1275">#1275</a>).</p>
<p>For example, to test if an error is a UNIQUE constraint
violation:</p>
<pre><code>if pqErr, ok :=
errors.AsType[*pq.Error](https://github.com/lib/pq/blob/HEAD/err); ok
&amp;&amp; pqErr.Code == pqerror.UniqueViolation {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
<p>To make this a bit more convenient, it also adds a
<code>pq.As()</code> function:</p>
<pre><code>pqErr := pq.As(err, pqerror.UniqueViolation)
if pqErr != nil {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>Fix SSL key permission check to allow modes stricter than 0600/0640
(<a
href="https://redirect.github.com/lib/pq/issues/1265">#1265</a>).</p>
</li>
<li>
<p>Fix Hstore to work with binary parameters (<a
href="https://redirect.github.com/lib/pq/issues/1278">#1278</a>).</p>
</li>
<li>
<p>Clearer error when starting a new query while pq is still processing
another query (<a
href="https://redirect.github.com/lib/pq/issues/1272">#1272</a>).</p>
</li>
<li>
<p>Send intermediate CAs with client certificates, so they can be signed
by an intermediate CA (<a
href="https://redirect.github.com/lib/pq/issues/1267">#1267</a>).</p>
</li>
<li>
<p>Use <code>time.UTC</code> for UTC aliases such as
<code>Etc/UTC</code> (<a
href="https://redirect.github.com/lib/pq/issues/1283">#1283</a>).</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/lib/pq/blob/master/CHANGELOG.md">github.com/lib/pq's
changelog</a>.</em></p>
<blockquote>
<h2>v1.12.0 (2026-03-18)</h2>
<ul>
<li>
<p>The next release may change the default sslmode from
<code>require</code> to <code>prefer</code>.
See <a href="https://redirect.github.com/lib/pq/issues/1271">#1271</a>
for details.</p>
</li>
<li>
<p><code>CopyIn()</code> and <code>CopyInToSchema()</code> have been
marked as deprecated. These are
simple query builders and not needed for <code>COPY [..] FROM
STDIN</code> support (which
is <em>not</em> deprecated). (<a
href="https://redirect.github.com/lib/pq/issues/1279">#1279</a>)</p>
<pre><code>// Old
tx.Prepare(CopyIn(&quot;temp&quot;, &quot;num&quot;, &quot;text&quot;,
&quot;blob&quot;, &quot;nothing&quot;))
<p>// Replacement
tx.Prepare(<code>copy temp (num, text, blob, nothing) from stdin</code>)
</code></pre></p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>
<p>Support protocol 3.2, and the <code>min_protocol_version</code> and
<code>max_protocol_version</code> DSN parameters (<a
href="https://redirect.github.com/lib/pq/issues/1258">#1258</a>).</p>
</li>
<li>
<p>Support <code>sslmode=prefer</code> and <code>sslmode=allow</code>
(<a
href="https://redirect.github.com/lib/pq/issues/1270">#1270</a>).</p>
</li>
<li>
<p>Support <code>ssl_min_protocol_version</code> and
<code>ssl_max_protocol_version</code> (<a
href="https://redirect.github.com/lib/pq/issues/1277">#1277</a>).</p>
</li>
<li>
<p>Support connection service file to load connection details (<a
href="https://redirect.github.com/lib/pq/issues/1285">#1285</a>).</p>
</li>
<li>
<p>Support <code>sslrootcert=system</code> and use
<code>~/.postgresql/root.crt</code> as the default
value of sslrootcert (<a
href="https://redirect.github.com/lib/pq/issues/1280">#1280</a>, <a
href="https://redirect.github.com/lib/pq/issues/1281">#1281</a>).</p>
</li>
<li>
<p>Add a new <code>pqerror</code> package with PostgreSQL error codes
(<a
href="https://redirect.github.com/lib/pq/issues/1275">#1275</a>).</p>
<p>For example, to test if an error is a UNIQUE constraint
violation:</p>
<pre><code>if pqErr, ok :=
errors.AsType[*pq.Error](https://github.com/lib/pq/blob/master/err); ok
&amp;&amp; pqErr.Code == pqerror.UniqueViolation {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
<p>To make this a bit more convenient, it also adds a
<code>pq.As()</code> function:</p>
<pre><code>pqErr := pq.As(err, pqerror.UniqueViolation)
if pqErr != nil {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>Fix SSL key permission check to allow modes stricter than <a
href="https://redirect.github.com/0600/0640/issues/0600">0600/06400600</a>
(<a
href="https://redirect.github.com/lib/pq/issues/1265">#1265</a>).</p>
</li>
<li>
<p>Fix Hstore to work with binary parameters (<a
href="https://redirect.github.com/lib/pq/issues/1278">#1278</a>).</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lib/pq/commit/42ab0ff7c4b1b585fa6cd216a12a126715b5af06"><code>42ab0ff</code></a>
Change default sslmode from &quot;require&quot; to
&quot;prefer&quot;</li>
<li><a
href="https://github.com/lib/pq/commit/6d40f13cfefe5ae4b489404b45114ba03224947a"><code>6d40f13</code></a>
Release v1.12.0</li>
<li><a
href="https://github.com/lib/pq/commit/386fc0e764f82951e9706dd8e618fc416fb5fb2c"><code>386fc0e</code></a>
Document NULL behaviour with COPY</li>
<li><a
href="https://github.com/lib/pq/commit/a62682e9083edee5ffe2d3904e80c30aaaa0877f"><code>a62682e</code></a>
Better staticcheck cache 2</li>
<li><a
href="https://github.com/lib/pq/commit/87ee06c600347478cfef07ad31b5ea617008aee7"><code>87ee06c</code></a>
Better staticcheck cache</li>
<li><a
href="https://github.com/lib/pq/commit/09624587cd3d4b69cd4a1a3b403b544ec0ddb2f7"><code>0962458</code></a>
Rewrite tests to use pqerror, pq.As()</li>
<li><a
href="https://github.com/lib/pq/commit/0d209810a155b9b8a173ab6d5da332f8c6cbc2c9"><code>0d20981</code></a>
Don't move pq.Error to pqerror.Error</li>
<li><a
href="https://github.com/lib/pq/commit/433213859e656dfe7dbba17b2838839e03a43ca2"><code>4332138</code></a>
Add pqerror package</li>
<li><a
href="https://github.com/lib/pq/commit/620d6d50817f9c4dcbfcbfeadb12ec552b636bf3"><code>620d6d5</code></a>
Make tests run faster</li>
<li><a
href="https://github.com/lib/pq/commit/dc8ff5d519b00bfa67626e68ea1ff3fdde0cc1b2"><code>dc8ff5d</code></a>
Implement connection service file</li>
<li>Additional commits viewable in <a
href="https://github.com/lib/pq/compare/v1.11.2...v1.12.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lib/pq&package-manager=go_modules&previous-version=1.11.2&new-version=1.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: aljo242 <[email protected]>
(cherry picked from commit 625420b)

# Conflicts:
#	go.mod
#	go.sum
#	state/indexer/sink/psql/psql.go
@mergify mergify Bot added the conflicts label Mar 24, 2026
@mergify

mergify Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 625420b has failed:

On branch mergify/bp/v0.38.x/pr-5713
Your branch is up to date with 'origin/v0.38.x'.

You are currently cherry-picking commit 625420b2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   libs/cli/helper.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   go.mod
	both modified:   go.sum
	both modified:   state/indexer/sink/psql/psql.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify
mergify Bot merged commit a098f3f into v0.38.x Mar 26, 2026
17 checks passed
@mergify
mergify Bot deleted the mergify/bp/v0.38.x/pr-5713 branch March 26, 2026 14:29
JayT106 pushed a commit to crypto-org-chain/cometbft that referenced this pull request May 7, 2026
…ometbft#5713) (cometbft#5724)

Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.11.2 to
1.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lib/pq/releases">github.com/lib/pq's
releases</a>.</em></p>
<blockquote>
<h2>v1.12.0</h2>
<ul>
<li>
<p>The next release may change the default sslmode from
<code>require</code> to <code>prefer</code>. See <a
href="https://redirect.github.com/lib/pq/issues/1271">#1271</a> for
details.</p>
</li>
<li>
<p><code>CopyIn()</code> and <code>CopyInToSchema()</code> have been
marked as deprecated. These are simple query builders and not needed for
<code>COPY [..] FROM STDIN</code> support (which is <em>not</em>
deprecated). (<a
href="https://redirect.github.com/lib/pq/issues/1279">#1279</a>)</p>
<pre><code>// Old
tx.Prepare(CopyIn(&quot;temp&quot;, &quot;num&quot;, &quot;text&quot;,
&quot;blob&quot;, &quot;nothing&quot;))
<p>// Replacement
tx.Prepare(<code>copy temp (num, text, blob, nothing) from stdin</code>)
</code></pre></p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>
<p>Support protocol 3.2, and the <code>min_protocol_version</code> and
<code>max_protocol_version</code> DSN parameters (<a
href="https://redirect.github.com/lib/pq/issues/1258">#1258</a>).</p>
</li>
<li>
<p>Support <code>sslmode=prefer</code> and <code>sslmode=allow</code>
(<a
href="https://redirect.github.com/lib/pq/issues/1270">#1270</a>).</p>
</li>
<li>
<p>Support <code>ssl_min_protocol_version</code> and
<code>ssl_max_protocol_version</code> (<a
href="https://redirect.github.com/lib/pq/issues/1277">#1277</a>).</p>
</li>
<li>
<p>Support connection service file to load connection details (<a
href="https://redirect.github.com/lib/pq/issues/1285">#1285</a>).</p>
</li>
<li>
<p>Support <code>sslrootcert=system</code> and use
<code>~/.postgresql/root.crt</code> as the default value of sslrootcert
(<a href="https://redirect.github.com/lib/pq/issues/1280">#1280</a>, <a
href="https://redirect.github.com/lib/pq/issues/1281">#1281</a>).</p>
</li>
<li>
<p>Add a new <code>pqerror</code> package with PostgreSQL error codes
(<a
href="https://redirect.github.com/lib/pq/issues/1275">#1275</a>).</p>
<p>For example, to test if an error is a UNIQUE constraint
violation:</p>
<pre><code>if pqErr, ok :=
errors.AsType[*pq.Error](https://github.com/lib/pq/blob/HEAD/err); ok
&amp;&amp; pqErr.Code == pqerror.UniqueViolation {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
<p>To make this a bit more convenient, it also adds a
<code>pq.As()</code> function:</p>
<pre><code>pqErr := pq.As(err, pqerror.UniqueViolation)
if pqErr != nil {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>Fix SSL key permission check to allow modes stricter than 0600/0640
(<a
href="https://redirect.github.com/lib/pq/issues/1265">#1265</a>).</p>
</li>
<li>
<p>Fix Hstore to work with binary parameters (<a
href="https://redirect.github.com/lib/pq/issues/1278">#1278</a>).</p>
</li>
<li>
<p>Clearer error when starting a new query while pq is still processing
another query (<a
href="https://redirect.github.com/lib/pq/issues/1272">#1272</a>).</p>
</li>
<li>
<p>Send intermediate CAs with client certificates, so they can be signed
by an intermediate CA (<a
href="https://redirect.github.com/lib/pq/issues/1267">#1267</a>).</p>
</li>
<li>
<p>Use <code>time.UTC</code> for UTC aliases such as
<code>Etc/UTC</code> (<a
href="https://redirect.github.com/lib/pq/issues/1283">#1283</a>).</p>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/lib/pq/blob/master/CHANGELOG.md">github.com/lib/pq's
changelog</a>.</em></p>
<blockquote>
<h2>v1.12.0 (2026-03-18)</h2>
<ul>
<li>
<p>The next release may change the default sslmode from
<code>require</code> to <code>prefer</code>.
See <a href="https://redirect.github.com/lib/pq/issues/1271">#1271</a>
for details.</p>
</li>
<li>
<p><code>CopyIn()</code> and <code>CopyInToSchema()</code> have been
marked as deprecated. These are
simple query builders and not needed for <code>COPY [..] FROM
STDIN</code> support (which
is <em>not</em> deprecated). (<a
href="https://redirect.github.com/lib/pq/issues/1279">#1279</a>)</p>
<pre><code>// Old
tx.Prepare(CopyIn(&quot;temp&quot;, &quot;num&quot;, &quot;text&quot;,
&quot;blob&quot;, &quot;nothing&quot;))
<p>// Replacement
tx.Prepare(<code>copy temp (num, text, blob, nothing) from stdin</code>)
</code></pre></p>
</li>
</ul>
<h3>Features</h3>
<ul>
<li>
<p>Support protocol 3.2, and the <code>min_protocol_version</code> and
<code>max_protocol_version</code> DSN parameters (<a
href="https://redirect.github.com/lib/pq/issues/1258">#1258</a>).</p>
</li>
<li>
<p>Support <code>sslmode=prefer</code> and <code>sslmode=allow</code>
(<a
href="https://redirect.github.com/lib/pq/issues/1270">#1270</a>).</p>
</li>
<li>
<p>Support <code>ssl_min_protocol_version</code> and
<code>ssl_max_protocol_version</code> (<a
href="https://redirect.github.com/lib/pq/issues/1277">#1277</a>).</p>
</li>
<li>
<p>Support connection service file to load connection details (<a
href="https://redirect.github.com/lib/pq/issues/1285">#1285</a>).</p>
</li>
<li>
<p>Support <code>sslrootcert=system</code> and use
<code>~/.postgresql/root.crt</code> as the default
value of sslrootcert (<a
href="https://redirect.github.com/lib/pq/issues/1280">#1280</a>, <a
href="https://redirect.github.com/lib/pq/issues/1281">#1281</a>).</p>
</li>
<li>
<p>Add a new <code>pqerror</code> package with PostgreSQL error codes
(<a
href="https://redirect.github.com/lib/pq/issues/1275">#1275</a>).</p>
<p>For example, to test if an error is a UNIQUE constraint
violation:</p>
<pre><code>if pqErr, ok :=
errors.AsType[*pq.Error](https://github.com/lib/pq/blob/master/err); ok
&amp;&amp; pqErr.Code == pqerror.UniqueViolation {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
<p>To make this a bit more convenient, it also adds a
<code>pq.As()</code> function:</p>
<pre><code>pqErr := pq.As(err, pqerror.UniqueViolation)
if pqErr != nil {
    log.Fatalf(&quot;email %q already exsts&quot;, email)
}
</code></pre>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>
<p>Fix SSL key permission check to allow modes stricter than <a
href="https://redirect.github.com/0600/0640/issues/0600">0600/06400600</a>
(<a
href="https://redirect.github.com/lib/pq/issues/1265">#1265</a>).</p>
</li>
<li>
<p>Fix Hstore to work with binary parameters (<a
href="https://redirect.github.com/lib/pq/issues/1278">#1278</a>).</p>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lib/pq/commit/42ab0ff7c4b1b585fa6cd216a12a126715b5af06"><code>42ab0ff</code></a>
Change default sslmode from &quot;require&quot; to
&quot;prefer&quot;</li>
<li><a
href="https://github.com/lib/pq/commit/6d40f13cfefe5ae4b489404b45114ba03224947a"><code>6d40f13</code></a>
Release v1.12.0</li>
<li><a
href="https://github.com/lib/pq/commit/386fc0e764f82951e9706dd8e618fc416fb5fb2c"><code>386fc0e</code></a>
Document NULL behaviour with COPY</li>
<li><a
href="https://github.com/lib/pq/commit/a62682e9083edee5ffe2d3904e80c30aaaa0877f"><code>a62682e</code></a>
Better staticcheck cache 2</li>
<li><a
href="https://github.com/lib/pq/commit/87ee06c600347478cfef07ad31b5ea617008aee7"><code>87ee06c</code></a>
Better staticcheck cache</li>
<li><a
href="https://github.com/lib/pq/commit/09624587cd3d4b69cd4a1a3b403b544ec0ddb2f7"><code>0962458</code></a>
Rewrite tests to use pqerror, pq.As()</li>
<li><a
href="https://github.com/lib/pq/commit/0d209810a155b9b8a173ab6d5da332f8c6cbc2c9"><code>0d20981</code></a>
Don't move pq.Error to pqerror.Error</li>
<li><a
href="https://github.com/lib/pq/commit/433213859e656dfe7dbba17b2838839e03a43ca2"><code>4332138</code></a>
Add pqerror package</li>
<li><a
href="https://github.com/lib/pq/commit/620d6d50817f9c4dcbfcbfeadb12ec552b636bf3"><code>620d6d5</code></a>
Make tests run faster</li>
<li><a
href="https://github.com/lib/pq/commit/dc8ff5d519b00bfa67626e68ea1ff3fdde0cc1b2"><code>dc8ff5d</code></a>
Implement connection service file</li>
<li>Additional commits viewable in <a
href="https://github.com/lib/pq/compare/v1.11.2...v1.12.0">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lib/pq&package-manager=go_modules&previous-version=1.11.2&new-version=1.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details><hr>This is an automatic backport of pull request cometbft#5713 done
by [Mergify](https://mergify.com).

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mattac21 <[email protected]>
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.

1 participant