Patch Changes
-
#8215
9367dcbThanks @hsyntax! - Preserve the originalSqlErrorwhen a PostgreSQL LISTEN connection fails after registration, allowingStream.retryto acquire a new listener. Intentional scope closure still interrupts consumers.Notification queues returned by
PgClient.listenandPgConnection.listennow carrySqlError. Update explicit queue and stream type annotations to include this error. -
#8200
8feeb3cThanks @tim-smart! - Supportsslmode=preferandsslmode=allowby trying TLS first, then plaintext if the server declinesSSLRequest. Unlike libpq,allowalso tries TLS first. Explicitssloverrides and certificate verification are unchanged. TLS handshake and certificate failures remain fatal. Cancellation never downgrades a TLS session to plaintext. -
#8234
4e4a3a6Thanks @tim-smart! - Add structuredstartupParametersand opaquestartupOptionsto connection config, and restore support for URLoptions. ExplicitstartupOptionsoverrides URLoptions; the startup packet field remainsoptions. Send session defaults in every physical connection's startup packet, including pooled replacements, with config validation and documented application-name precedence. -
#8224
205066aThanks @alvarosevilla95! - Support infallible Effect password providers with no service requirements, refreshed per PostgreSQL connection and schema dump. -
#8241
8ef3fcbThanks @tim-smart! - Decodetimestampandtimestamptzvalues, including array elements, asDateinstead of epoch milliseconds. Their encoders, includingPgTypes.timestampandPgTypes.timestamptz, accept either form. Precision remains milliseconds.Breaking changes
- Numeric readers must call
date.getTime()or restore numeric codecs withPgTypes.registeror a clientRegistrypassed astypes. infinity,-infinityand values outside the JavaScriptDaterange decode to an invalidDate. Numeric±Infinitystill encodes PostgreSQL's sentinels; encoding an invalidDatefails withPgTypes.CodecError.
Date parameters bind as
timestamptz. Inserting one into atimestampcolumn applies the sessionTimeZone. Use UTC orPgTypes.timestamp(value)to preserve its UTC fields.timestamptzround trips preserve the instant regardless of session timezone. - Numeric readers must call
-
#8240
fd910d1Thanks @tim-smart! - Decode unregistered OIDs as UTF-8 text so scalar enums return string labels.Other binary user-defined types, including enum arrays, may produce garbled text or fail UTF-8 decoding. Decode failures close the connection, failing its pending queries and discarding transactions and
LISTENsubscriptions; the pool replaces it.Register scalar codecs with
PgTypes.register. For arrays, usePgTypes.makeRegistry().register(elementOid, codec, { arrayOid })and pass the registry as the client'stypesoption. -
Updated dependencies [
c19c63f,8cb0a4f,8f420bb,1393080,ccae354,553c403,45b5103,77a5612,1076170,f110af1,0045152,51d4a2f,4d4c4e8,ccfe152,d30a0c8,84fe64a,49e4b37,49e4b37,a2c4154,23a58c0,feef90c,755e863,49e4b37,9ad9891,0beded0,2940742,63c1566]:- effect@4.0.0-rc.116