Upgrading postgres 2 to 3
Breaking2.6.4 → 3.5.20Breaking8Security1Platform1Deprecated2New24Changed11Fixed83Other1
Fetching 50 releases from GitHub…43 / 50
SecurityCompares the SCRAM server signature in constant time in SASL and rejects servers that do not offer `SCRAM-SHA-256`.Advisory ↗
BreakingUpgrade verdict
6 breaking changes and a platform requirement change and a security fix.
In plain terms
- Code catching ServerException for cancelled queries may need to catch the new exception type instead.
- Old version 2 APIs are gone, so code that still uses them will stop working.
- Zero or negative timeouts are now rejected when settings are built rather than silently meaning no timeout.
- Two database error types now belong to a different parent error type, which can affect code that catches them.
Must act Top 5 of 10 that need code or config changes
Dart SDK requirement changed in 3.5.8: >=3.0.0 <4.0.0 → ^3.9.0.
What you must change
Breaking6
ServerException may be transformed into _PgQueryCancelledException, which is a PgException and TimeoutException but no longer a ServerException.
ServerException_PgQueryCancelledExceptionPgExceptionTimeoutExceptionRemoves legacy v2 APIs that were originally planned for removal in 3.1.0.
Rejects connectTimeout/queryTimeout of Duration.zero or negative at settings construction instead of treating them as wait forever.
connectTimeoutqueryTimeoutDuration.zeroUniqueViolationException and ForeignKeyViolationException now extend ServerException instead of PgException.
UniqueViolationExceptionForeignKeyViolationExceptionServerExceptionPgExceptionPreparing or executing a statement on the main connection inside a runTx callback now throws an exception.
runTxRemoves @internal-annotated methods from the public API of ServerException and Severity.
ServerExceptionSeveritySecurity1
Compares the SCRAM server signature in constant time in SASL and rejects servers that do not offer
SCRAM-SHA-256.SCRAM-SHA-256Platform1
Raises the minimum Dart SDK to 3.4 due to the stack_trace dependency.
Deprecations to plan for
Deprecated2
Deprecates TupleDataColumn.data in favor of .value for binary protocol messages.
TupleDataColumn.dataTupleDataColumn.valueDeprecates some logical replication message parsing methods.