Skip to content

fix(deps): update module github.com/jackc/pgx/v4 to v5#94

Open
red-hat-konflux[bot] wants to merge 1 commit intomainfrom
konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x
Open

fix(deps): update module github.com/jackc/pgx/v4 to v5#94
red-hat-konflux[bot] wants to merge 1 commit intomainfrom
konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x

Conversation

@red-hat-konflux
Copy link

@red-hat-konflux red-hat-konflux bot commented Mar 2, 2025

This PR contains the following updates:

Package Change Age Confidence
github.com/jackc/pgx/v4 v4.18.3 -> v5.8.0 age confidence

Release Notes

jackc/pgx (github.com/jackc/pgx/v4)

v5.8.0

Compare Source

v5.7.6

Compare Source

v5.7.5

Compare Source

v5.7.4

Compare Source

v5.7.3

Compare Source

v5.7.2

Compare Source

v5.7.1

Compare Source

v5.7.0

Compare Source

v5.6.0

Compare Source

v5.5.5

Compare Source

v5.5.4

Compare Source

v5.5.3

Compare Source

v5.5.2

Compare Source

v5.5.1

Compare Source

v5.5.0

Compare Source

v5.4.3

Compare Source

v5.4.2

Compare Source

v5.4.1

Compare Source

v5.4.0

Compare Source

v5.3.1

Compare Source

v5.3.0

Compare Source

v5.2.0

Compare Source

v5.1.1

Compare Source

v5.1.0

Compare Source

v5.0.4

Compare Source

v5.0.3

Compare Source

v5.0.2

Compare Source

  • Fix date encoding in text format to always use 2 digits for month and day
  • Prefer driver.Valuer over wrap plans when encoding
  • Fix scan to pointer to pointer to renamed type
  • Allow scanning NULL even if PG and Go types are incompatible

v5.0.1

Compare Source

  • Fix 32-bit atomic usage
  • Add MarshalJSON for Float8 (yogipristiawan)
  • Add [ and ] to text encoding of Lseg
  • Fix sqlScannerWrapper NULL handling

v5.0.0

Compare Source

Merged Packages

github.com/jackc/pgtype, github.com/jackc/pgconn, and github.com/jackc/pgproto3 are now included in the main
github.com/jackc/pgx repository. Previously there was confusion as to where issues should be reported, additional
release work due to releasing multiple packages, and less clear changelogs.

pgconn

CommandTag is now an opaque type instead of directly exposing an underlying []byte.

The return value ResultReader.Values() is no longer safe to retain a reference to after a subsequent call to NextRow() or Close().

Trace() method adds low level message tracing similar to the PQtrace function in libpq.

pgconn now uses non-blocking IO. This is a significant internal restructuring, but it should not cause any visible changes on its own. However, it is important in implementing other new features.

CheckConn() checks a connection's liveness by doing a non-blocking read. This can be used to detect database restarts or network interruptions without executing a query or a ping.

pgconn now supports pipeline mode.

*PgConn.ReceiveResults removed. Use pipeline mode instead.

Timeout() no longer considers context.Canceled as a timeout error. context.DeadlineExceeded still is considered a timeout error.

pgxpool

Connect and ConnectConfig have been renamed to New and NewWithConfig respectively. The LazyConnect option has been removed. Pools always lazily connect.

pgtype

The pgtype package has been significantly changed.

NULL Representation

Previously, types had a Status field that could be Undefined, Null, or Present. This has been changed to a
Valid bool field to harmonize with how database/sql represents NULL and to make the zero value useable.

Previously, a type that implemented driver.Valuer would have the Value method called even on a nil pointer. All nils
whether typed or untyped now represent NULL.

Codec and Value Split

Previously, the type system combined decoding and encoding values with the value types. e.g. Type Int8 both handled
encoding and decoding the PostgreSQL representation and acted as a value object. This caused some difficulties when
there was not an exact 1 to 1 relationship between the Go types and the PostgreSQL types For example, scanning a
PostgreSQL binary numeric into a Go float64 was awkward (see jackc/pgtype#147). This
concepts have been separated. A Codec only has responsibility for encoding and decoding values. Value types are
generally defined by implementing an interface that a particular Codec understands (e.g. PointScanner and
PointValuer for the PostgreSQL point type).

Array Types

All array types are now handled by ArrayCodec instead of using code generation for each new array type. This also
means that less common array types such as point[] are now supported. Array[T] supports PostgreSQL multi-dimensional
arrays.

Composite Types

Composite types must be registered before use. CompositeFields may still be used to construct and destruct composite
values, but any type may now implement CompositeIndexGetter and CompositeIndexScanner to be used as a composite.

Range Types

Range types are now handled with types RangeCodec and Range[T]. This allows additional user defined range types to
easily be handled. Multirange types are handled similarly with MultirangeCodec and Multirange[T].

pgxtype

LoadDataType moved to *Conn as LoadType.

Bytea

The Bytea and GenericBinary types have been replaced. Use the following instead:

  • []byte - For normal usage directly use []byte.
  • DriverBytes - Uses driver memory only available until next database method call. Avoids a copy and an allocation.
  • PreallocBytes - Uses preallocated byte slice to avoid an allocation.
  • UndecodedBytes - Avoids any decoding. Allows working with raw bytes.
Dropped lib/pq Support

pgtype previously supported and was tested against lib/pq. While it will continue to work
in most cases this is no longer supported.

database/sql Scan

Previously, most Scan implementations would convert []byte to string automatically to decode a text value. Now
only string is handled. This is to allow the possibility of future binary support in database/sql mode by
considering []byte to be binary format and string text format. This change should have no effect for any use with
pgx. The previous behavior was only necessary for lib/pq compatibility.

Added *Map.SQLScanner to create a sql.Scanner for types such as []int32 and Range[T] that do not implement
sql.Scanner directly.

Number Type Fields Include Bit size

Int2, Int4, Int8, Float4, Float8, and Uint32 fields now include bit size. e.g. Int is renamed to Int64.
This matches the convention set by database/sql. In addition, for comparable types like pgtype.Int8 and
sql.NullInt64 the structures are identical. This means they can be directly converted one to another.

3rd Party Type Integrations
Other Changes
  • Bit and Varbit are both replaced by the Bits type.
  • CID, OID, OIDValue, and XID are replaced by the Uint32 type.
  • Hstore is now defined as map[string]*string.
  • JSON and JSONB types removed. Use []byte or string directly.
  • QChar type removed. Use rune or byte directly.
  • Inet and Cidr types removed. Use netip.Addr and netip.Prefix directly. These types are more memory efficient than the previous net.IPNet.
  • Macaddr type removed. Use net.HardwareAddr directly.
  • Renamed pgtype.ConnInfo to pgtype.Map.
  • Renamed pgtype.DataType to pgtype.Type.
  • Renamed pgtype.None to pgtype.Finite.
  • RegisterType now accepts a *Type instead of Type.
  • Assorted array helper methods and types made private.

stdlib

  • Removed AcquireConn and ReleaseConn as that functionality has been built in since Go 1.13.

Reduced Memory Usage by Reusing Read Buffers

Previously, the connection read buffer would allocate large chunks of memory and never reuse them. This allowed
transferring ownership to anything such as scanned values without incurring an additional allocation and memory copy.
However, this came at the cost of overall increased memory allocation size. But worse it was also possible to pin large
chunks of memory by retaining a reference to a small value that originally came directly from the read buffer. Now
ownership remains with the read buffer and anything needing to retain a value must make a copy.

Query Execution Modes

Control over automatic prepared statement caching and simple protocol use are now combined into query execution mode.
See documentation for QueryExecMode.

QueryRewriter Interface and NamedArgs

pgx now supports named arguments with the NamedArgs type. This is implemented via the new QueryRewriter interface which
allows arbitrary rewriting of query SQL and arguments.

RowScanner Interface

The RowScanner interface allows a single argument to Rows.Scan to scan the entire row.

Rows Result Helpers

  • CollectRows and RowTo* functions simplify collecting results into a slice.
  • CollectOneRow collects one row using RowTo* functions.
  • ForEachRow simplifies scanning each row and executing code using the scanned values. ForEachRow replaces QueryFunc.

Tx Helpers

Rather than every type that implemented Begin or BeginTx methods also needing to implement BeginFunc and
BeginTxFunc these methods have been converted to functions that take a db that implements Begin or BeginTx.

Improved Batch Query Ergonomics

Previously, the code for building a batch went in one place before the call to SendBatch, and the code for reading the
results went in one place after the call to SendBatch. This could make it difficult to match up the query and the code
to handle the results. Now Queue returns a QueuedQuery which has methods Query, QueryRow, and Exec which can
be used to register a callback function that will handle the result. Callback functions are called automatically when
BatchResults.Close is called.

SendBatch Uses Pipeline Mode When Appropriate

Previously, a batch with 10 unique parameterized statements executed 100 times would entail 11 network round trips. 1
for each prepare / describe and 1 for executing them all. Now pipeline mode is used to prepare / describe all statements
in a single network round trip. So it would only take 2 round trips.

Tracing and Logging

Internal logging support has been replaced with tracing hooks. This allows custom tracing integration with tools like OpenTelemetry. Package tracelog provides an adapter for pgx v4 loggers to act as a tracer.

All integrations with 3rd party loggers have been extracted to separate repositories. This trims the pgx dependency
tree.


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

To execute skipped test pipelines write comment /ok-to-test.


Documentation

Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.

@red-hat-konflux
Copy link
Author

red-hat-konflux bot commented Mar 2, 2025

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 1 additional dependency was updated

Details:

Package Change
github.com/stretchr/testify v1.8.1 -> v1.11.1

@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 71eba48 to fdbd5ca Compare March 30, 2025 12:26
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from fdbd5ca to 4c31929 Compare April 13, 2025 05:08
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 4c31929 to eb21d40 Compare May 4, 2025 05:18
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from eb21d40 to 16f3532 Compare May 18, 2025 12:47
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 16f3532 to d04f946 Compare September 14, 2025 08:16
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from d04f946 to ba208f8 Compare October 2, 2025 16:17
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Oct 25, 2025
@red-hat-konflux red-hat-konflux bot closed this Oct 25, 2025
@red-hat-konflux red-hat-konflux bot deleted the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch October 25, 2025 08:12
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Oct 25, 2025
@red-hat-konflux red-hat-konflux bot reopened this Oct 25, 2025
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 9a68656 to ba208f8 Compare October 25, 2025 12:16
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Oct 29, 2025
@red-hat-konflux red-hat-konflux bot closed this Oct 29, 2025
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Oct 29, 2025
@red-hat-konflux red-hat-konflux bot reopened this Oct 29, 2025
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 7f4efb1 to ba208f8 Compare October 29, 2025 16:21
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Nov 7, 2025
@red-hat-konflux red-hat-konflux bot closed this Nov 7, 2025
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Nov 7, 2025
@red-hat-konflux red-hat-konflux bot reopened this Nov 7, 2025
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 3dbdb4b to ba208f8 Compare November 7, 2025 12:18
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 fix(deps): update module github.com/jackc/pgx/v4 to v5 Nov 12, 2025
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from ba208f8 to e55ba61 Compare November 12, 2025 12:19
@red-hat-konflux red-hat-konflux bot changed the title fix(deps): update module github.com/jackc/pgx/v4 to v5 fix(deps): update module github.com/jackc/pgx/v4 to v5 - autoclosed Nov 17, 2025
@red-hat-konflux red-hat-konflux bot closed this Nov 17, 2025
@red-hat-konflux red-hat-konflux bot changed the title fix(deps): update module github.com/jackc/pgx/v4 to v5 - autoclosed fix(deps): update module github.com/jackc/pgx/v4 to v5 Nov 17, 2025
@red-hat-konflux red-hat-konflux bot reopened this Nov 17, 2025
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 1b06fc5 to e55ba61 Compare November 17, 2025 12:18
@red-hat-konflux red-hat-konflux bot closed this Dec 29, 2025
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Dec 30, 2025
@red-hat-konflux red-hat-konflux bot reopened this Dec 30, 2025
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 014f9e9 to 0b543a4 Compare December 30, 2025 00:20
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Jan 3, 2026
@red-hat-konflux red-hat-konflux bot closed this Jan 3, 2026
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Jan 3, 2026
@red-hat-konflux red-hat-konflux bot reopened this Jan 3, 2026
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Jan 6, 2026
@red-hat-konflux red-hat-konflux bot closed this Jan 6, 2026
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Jan 6, 2026
@red-hat-konflux red-hat-konflux bot reopened this Jan 6, 2026
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 4588b1a to 0b543a4 Compare January 6, 2026 16:23
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Jan 16, 2026
@red-hat-konflux red-hat-konflux bot closed this Jan 16, 2026
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Jan 16, 2026
@red-hat-konflux red-hat-konflux bot reopened this Jan 16, 2026
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch 3 times, most recently from 5b69367 to 6103c8d Compare January 22, 2026 12:21
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 6103c8d to ddfef2f Compare January 23, 2026 16:20
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 Update module github.com/jackc/pgx/v4 to v5 - autoclosed Jan 28, 2026
@red-hat-konflux red-hat-konflux bot closed this Jan 28, 2026
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 - autoclosed Update module github.com/jackc/pgx/v4 to v5 Jan 28, 2026
@red-hat-konflux red-hat-konflux bot reopened this Jan 28, 2026
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch 2 times, most recently from ddfef2f to 4968b14 Compare January 28, 2026 20:17
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
@red-hat-konflux red-hat-konflux bot force-pushed the konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x branch from 4968b14 to 6aba1be Compare February 2, 2026 20:17
@red-hat-konflux red-hat-konflux bot changed the title Update module github.com/jackc/pgx/v4 to v5 fix(deps): update module github.com/jackc/pgx/v4 to v5 Feb 2, 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.

0 participants