Repository navigation
Keep DateTime instants in pg timestamp params and Timeout::Error on Ruby 3.1's bundled timeout - #61
Merged
devin-ai-integration[bot] merged 1 commit intoNov 4, 2026
Conversation
…uby 3.1's bundled timeout Co-Authored-By: Doron Eli Rachman <doron050@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
devin-ai-integration
Bot
deleted the
devin/1793771294-pg-datetime-timeout
branch
November 4, 2026 06:01
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
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.
Summary
Three PostgreSQL-related fixes from a pre-release check.
DateTimeas aDate, soDateTime.new(2024, 1, 1, 10, 0, 0, '+02:00')was stored as midnight intimestamp/timestamptzcolumns.encode_timestampnow converts aDateTimeto a localTime, the same way it already handlesTime(this matches MySQL). The encoder now also runs fortimestamptzparams. The RBS still declares::Time, the type rows return, same as on MySQL.Dateparams are unchanged: they mean midnight.Timeoutleaves the block withthrow. The cancelled query left the transaction in error, and itsensurereplaced the throw withPG::InFailedSqlTransaction. The legacy transaction template now skips that raise when the block was left without completing under an old Timeout. The transaction still rolls back andTimeout::Errorreaches the caller. This also works for nested transactions (savepoints).timestampand MySQLDATETIMEstore local wall-clock time. An instant in the hour that repeats when clocks fall back from daylight saving time reads back as the first of the two.Tests
mainand pass on this branch:test_datetime_parameters_keep_their_instant, andtest_transaction_timeout_rolls_back_and_keeps_connection_usable(now with a nested-transaction case), both intests/end2end_pg.rb.bundled-timeouton Ruby 3.1.Gemfile.e2ehonoursE2E_TIMEOUT_GEM=0.2.0by replacing the generatedgem 'timeout', '>= 0.4'. Until now every Ruby 3.1 job ran with timeout >= 0.4, so this path was never exercised.main, 0 on this branch (93 runs). Ruby 3.4: 93 runs, 0 failures.docs/Coverage.mdanddocs/Testing.mdare updated.examples/pgand the pg golden files are regenerated, andsteep_expectations.ymlis updated for shifted line numbers (still 71 diagnostics).Checklist
examples/is regenerated (rake sqlc_generate_process) and committedrake test, andrake end2end_*when the generated code changes)rake rubocop) and Steep-clean (rake steep)bug,enhancement,documentation, orbreaking) so the release notes are grouped correctlyRequested by: @doron050