Update module github.com/lib/pq to v1.12.3 - abandoned#47987
Update module github.com/lib/pq to v1.12.3 - abandoned#47987renovate[bot] wants to merge 7 commits into
Conversation
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
|
@songy23 that test looks bad:
|
|
@obs-gh-scottsolmonson the test fails persistently: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/25445226688/job/74647776485?pr=47987 this may be a problem on double precision? |
…v1.12.3 lib/pq v1.12.x removed the on-connect override that set extra_float_digits=2 (lib/pq#1212). Without that override, PostgreSQL 12+ uses the default extra_float_digits=1 and emits the shortest round-trip text representation for floats. The driver hands these strings to setDataPointValue, which parses them with strconv.ParseFloat, so the resulting float64 values change: - avg(action ratings): 7.6499999999999995 -> 7.65 - avg(scifi ratings): 8.200000000000001 -> 8.2 - 4.3::real: 4.3000002 -> 4.3 Update the expected metrics for TestPostgresqlDataSourceFieldsIntegrationMetrics accordingly. The sybase/sqlserver fixtures use a different driver and are not affected. Assisted-by: Claude Opus 4.7
|
@obs-gh-scottsolmonson OK so the problem is indeed with double precisions. lib/pq v1.12 (lib/pq#1212) removed the on-connect extra_float_digits=2 override. Without it, PostgreSQL 12+ uses the default extra_float_digits=1 and emits the shortest round-trip text for floats. The driver hands these as strings to setDataPointValue in internal/sqlquery/metrics.go, which parses with strconv.ParseFloat, so the resulting float64 values change: avg of Action ratings: 7.6499999999999995 → 7.65 And it breaks the test. I pushed a fix: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/47987/changes/79c0251c3a62c1780fb9bd1e3c7eaabf15f0c014 but defer to code owners on whether to move forward with the version & fix |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR contains the following updates:
v1.10.9→v1.12.3Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
lib/pq (github.com/lib/pq)
v1.12.3Compare Source
that use a different default datestyle such as EnterpriseDB (#1312).
v1.12.2Compare Source
connection. Since v1.12.0 this could result in permanently broken connections,
especially with CockroachDB which frequently sends partial messages (#1299).
v1.12.1Compare 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.0Compare Source
The next release may change the default sslmode from
requiretoprefer.See #1271 for details.
CopyIn()andCopyInToSchema()have been marked as deprecated. These aresimple query builders and not needed for
COPY [..] FROM STDINsupport (whichis not deprecated). (#1279)
Features
Support protocol 3.2, and the
min_protocol_versionandmax_protocol_versionDSN parameters (#1258).Support
sslmode=preferandsslmode=allow(#1270).Support
ssl_min_protocol_versionandssl_max_protocol_version(#1277).Support connection service file to load connection details (#1285).
Support
sslrootcert=systemand use~/.postgresql/root.crtas the defaultvalue of sslrootcert (#1280, #1281).
Add a new
pqerrorpackage with PostgreSQL error codes (#1275).For example, to test if an error is a UNIQUE constraint violation:
To make this a bit more convenient, it also adds a
pq.As()function: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.UTCfor UTC aliases such asEtc/UTC(#1282).v1.11.2Compare Source
This fixes two regressions:
Don't send startup parameters if there is no value, improving compatibility
with Supavisor (#1260).
Don't send
dbnameas a startup parameter ifdatabase=[..]is used in theconnection string. It's recommended to use dbname=, as database= is not a
libpq option, and only worked by accident previously. (#1261)
v1.11.1Compare Source
This fixes two regressions present in the v1.11.0 release:
Fix build on 32bit systems, Windows, and Plan 9 (#1253).
Named []byte types and pointers to []byte (e.g.
*[]byte,json.RawMessage)would be treated as an array instead of bytea (#1252).
v1.11.0Compare Source
This version of pq requires Go 1.21 or newer.
pq now supports only maintained PostgreSQL releases, which is PostgreSQL 14 and
newer. Previously PostgreSQL 8.4 and newer were supported.
Features
The
pq.Error.Error()text includes the position of the error (if reportedby PostgreSQL) and SQLSTATE code (#1219, #1224):
The
pq.Error.ErrorWithDetail()method prints a more detailed multilinemessage, with the Detail, Hint, and error position (if any) (#1219):
Add
Config,NewConfig(), andNewConnectorConfig()to supply connectiondetails in a more structured way (#1240).
Support
hostaddrand$PGHOSTADDR(#1243).Support multiple values in
host,port, andhostaddr, which are eachtried in order, or randomly if
load_balance_hosts=randomis set (#1246).Support
target_session_attrsconnection parameter (#1246).Support
sslnegotiationto use SSL without negotiation (#1180).Allow using a custom
tls.Config, for example for encrypted keys (#1228).Add
PQGO_DEBUG=1print the communication with PostgreSQL to stderr, to aidin debugging, testing, and bug reports (#1223).
Add support for NamedValueChecker interface (#1125, #1238).
Fixes
Match HOME directory lookup logic with libpq: prefer $HOME over /etc/passwd,
ignore ENOTDIR errors, and use APPDATA on Windows (#1214).
Fix
sslmode=verify-caverifying the hostname anyway when connecting to a DNSname (rather than IP) (#1226).
Correctly detect pre-protocol errors such as the server not being able to fork
or running out of memory (#1248).
Fix build with wasm (#1184), appengine (#745), and Plan 9 (#1133).
Deprecate and type alias
pq.NullTimetosql.NullTime(#1211).Enforce integer limits of the Postgres wire protocol (#1161).
Accept the
passfileconnection parameter to overridePGPASSFILE(#1129).Fix connecting to socket on Windows systems (#1179).
Don't perform a permission check on the .pgpass file on Windows (#595).
Warn about incorrect .pgpass permissions (#595).
Don't set extra_float_digits (#1212).
Decode bpchar into a string (#949).
Fix panic in Ping() by not requiring CommandComplete or EmptyQueryResponse in
simpleQuery() (#1234)
Recognize bit/varbit (#743) and float types (#1166) in ColumnTypeScanType().
Accept
PGGSSLIBandPGKRBSRVNAMEenvironment variables (#1143).Handle ErrorResponse in readReadyForQuery and return proper error (#1136).
CopyIn() and CopyInSchema() now work if the list of columns is empty, in which
case it will copy all columns (#1239).
Treat nil []byte in query parameters as nil/NULL rather than
""(#838).Accept multiple authentication methods before checking AuthOk, which improves
compatibility with PgPool-II (#1188).
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.