-
Notifications
You must be signed in to change notification settings - Fork 29
fix(deps): update module github.com/jackc/pgx/v4 to v5 #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
red-hat-konflux
wants to merge
1
commit into
main
Choose a base branch
from
konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix(deps): update module github.com/jackc/pgx/v4 to v5 #94
red-hat-konflux
wants to merge
1
commit into
main
from
konflux/mintmaker/main/github.com-jackc-pgx-v4-5.x
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
ℹ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
71eba48 to
fdbd5ca
Compare
fdbd5ca to
4c31929
Compare
4c31929 to
eb21d40
Compare
eb21d40 to
16f3532
Compare
16f3532 to
d04f946
Compare
d04f946 to
ba208f8
Compare
9a68656 to
ba208f8
Compare
7f4efb1 to
ba208f8
Compare
3dbdb4b to
ba208f8
Compare
ba208f8 to
e55ba61
Compare
1b06fc5 to
e55ba61
Compare
04f70ff to
e55ba61
Compare
e55ba61 to
ba79611
Compare
ba79611 to
70aa1af
Compare
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
70aa1af to
083334c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v4.18.3->v5.7.6Warning
Some dependencies could not be looked up. Check the warning logs for more information.
Release Notes
jackc/pgx (github.com/jackc/pgx/v4)
v5.7.6Compare Source
v5.7.5Compare Source
v5.7.4Compare Source
v5.7.3Compare Source
v5.7.2Compare Source
v5.7.1Compare Source
v5.7.0Compare Source
v5.6.0Compare Source
v5.5.5Compare Source
v5.5.4Compare Source
v5.5.3Compare Source
v5.5.2Compare Source
v5.5.1Compare Source
v5.5.0Compare Source
v5.4.3Compare Source
v5.4.2Compare Source
v5.4.1Compare Source
v5.4.0Compare Source
v5.3.1Compare Source
v5.3.0Compare Source
v5.2.0Compare Source
v5.1.1Compare Source
v5.1.0Compare Source
v5.0.4Compare Source
v5.0.3Compare Source
v5.0.2Compare Source
v5.0.1Compare Source
[and]to text encoding ofLsegv5.0.0Compare Source
Merged Packages
github.com/jackc/pgtype,github.com/jackc/pgconn, andgithub.com/jackc/pgproto3are now included in the maingithub.com/jackc/pgxrepository. Previously there was confusion as to where issues should be reported, additionalrelease work due to releasing multiple packages, and less clear changelogs.
pgconn
CommandTagis 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 toNextRow()orClose().Trace()method adds low level message tracing similar to thePQtracefunction inlibpq.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.ReceiveResultsremoved. Use pipeline mode instead.Timeout()no longer considerscontext.Canceledas a timeout error.context.DeadlineExceededstill is considered a timeout error.pgxpool
ConnectandConnectConfighave been renamed toNewandNewWithConfigrespectively. TheLazyConnectoption has been removed. Pools always lazily connect.pgtype
The
pgtypepackage has been significantly changed.NULL Representation
Previously, types had a
Statusfield that could beUndefined,Null, orPresent. This has been changed to aValidboolfield to harmonize with howdatabase/sqlrepresentsNULLand to make the zero value useable.Previously, a type that implemented
driver.Valuerwould have theValuemethod called even on a nil pointer. All nilswhether 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
Int8both handledencoding 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
numericinto a Gofloat64was awkward (see jackc/pgtype#147). Thisconcepts have been separated. A
Codeconly has responsibility for encoding and decoding values. Value types aregenerally defined by implementing an interface that a particular
Codecunderstands (e.g.PointScannerandPointValuerfor the PostgreSQLpointtype).Array Types
All array types are now handled by
ArrayCodecinstead of using code generation for each new array type. This alsomeans that less common array types such as
point[]are now supported.Array[T]supports PostgreSQL multi-dimensionalarrays.
Composite Types
Composite types must be registered before use.
CompositeFieldsmay still be used to construct and destruct compositevalues, but any type may now implement
CompositeIndexGetterandCompositeIndexScannerto be used as a composite.Range Types
Range types are now handled with types
RangeCodecandRange[T]. This allows additional user defined range types toeasily be handled. Multirange types are handled similarly with
MultirangeCodecandMultirange[T].pgxtype
LoadDataTypemoved to*ConnasLoadType.Bytea
The
ByteaandGenericBinarytypes 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
pgtypepreviously supported and was tested against lib/pq. While it will continue to workin most cases this is no longer supported.
database/sql Scan
Previously, most
Scanimplementations would convert[]bytetostringautomatically to decode a text value. Nowonly
stringis handled. This is to allow the possibility of future binary support indatabase/sqlmode byconsidering
[]byteto be binary format andstringtext format. This change should have no effect for any use withpgx. The previous behavior was only necessary forlib/pqcompatibility.Added
*Map.SQLScannerto create asql.Scannerfor types such as[]int32andRange[T]that do not implementsql.Scannerdirectly.Number Type Fields Include Bit size
Int2,Int4,Int8,Float4,Float8, andUint32fields now include bit size. e.g.Intis renamed toInt64.This matches the convention set by
database/sql. In addition, for comparable types likepgtype.Int8andsql.NullInt64the structures are identical. This means they can be directly converted one to another.3rd Party Type Integrations
https://github.com/jackc/pgx-shopspring-decimal and https://github.com/jackc/pgx-gofrs-uuid respectively. This trims
the pgx dependency tree.
Other Changes
BitandVarbitare both replaced by theBitstype.CID,OID,OIDValue, andXIDare replaced by theUint32type.Hstoreis now defined asmap[string]*string.JSONandJSONBtypes removed. Use[]byteorstringdirectly.QChartype removed. Useruneorbytedirectly.InetandCidrtypes removed. Usenetip.Addrandnetip.Prefixdirectly. These types are more memory efficient than the previousnet.IPNet.Macaddrtype removed. Usenet.HardwareAddrdirectly.pgtype.ConnInfotopgtype.Map.pgtype.DataTypetopgtype.Type.pgtype.Nonetopgtype.Finite.RegisterTypenow accepts a*Typeinstead ofType.stdlib
AcquireConnandReleaseConnas 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
NamedArgstype. This is implemented via the newQueryRewriterinterface whichallows arbitrary rewriting of query SQL and arguments.
RowScanner Interface
The
RowScannerinterface allows a single argument to Rows.Scan to scan the entire row.Rows Result Helpers
CollectRowsandRowTo*functions simplify collecting results into a slice.CollectOneRowcollects one row usingRowTo*functions.ForEachRowsimplifies scanning each row and executing code using the scanned values.ForEachRowreplacesQueryFunc.Tx Helpers
Rather than every type that implemented
BeginorBeginTxmethods also needing to implementBeginFuncandBeginTxFuncthese methods have been converted to functions that take a db that implementsBeginorBeginTx.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 theresults went in one place after the call to
SendBatch. This could make it difficult to match up the query and the codeto handle the results. Now
Queuereturns aQueuedQuerywhich has methodsQuery,QueryRow, andExecwhich canbe used to register a callback function that will handle the result. Callback functions are called automatically when
BatchResults.Closeis 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.
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.