Repository navigation
Drop the timestamptz session TimeZone patch - #3
Merged
Merged
Conversation
The patch converted timestamptz values into the session TimeZone, calling time.LoadLocation on the name PostgreSQL reports and returning the error when that failed. PostgreSQL accepts TimeZone settings that are not IANA names -- '+08:00', 'GMT+8', '-7', reported back as POSIX specs such as '<-07>+07' -- so for those sessions every timestamptz read failed with "unknown time zone" instead of returning a row. The decoded instant was never wrong, only the location it was displayed in, so the conversion belongs in the caller, where a name Go cannot load can fall back to the offset the server reports. Those zones are fixed offsets with no DST, so a fixed zone is exact rather than an approximation. ColumnTypePrecisionScale is now the fork's only patch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
d-bytebase
added a commit
to bytebase/bytebase
that referenced
this pull request
Nov 2, 2026
bytebase/pgx#3 merged with a merge commit rather than a fast-forward, so the fork's master moved past the commit this branch pinned. The trees are identical, so the compiled code does not change; this only makes the pin name master's tip instead of a commit on a merged feature branch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
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.
The patch converted timestamptz values into the session
TimeZone, callingtime.LoadLocationon the name PostgreSQL reports and returning the error when that failed.PostgreSQL accepts
TimeZonesettings that are not IANA names. Measured against PostgreSQL 17, every POSIX offset spec it accepts made a timestamptz read fail:Every IANA name and tzdata alias worked, and
timestampanddatewere unaffected. The same matrix is identical on the pre-rebase fork, so this is not a regression from the v5.12.0 rebase.The decoded instant was never wrong, only the location it was displayed in, so the conversion belongs in the caller, where a name Go cannot load can fall back to the offset the server reports. Those zones are fixed offsets with no DST, so a fixed zone is exact rather than an approximation. Bytebase does that in
backend/plugin/db/pg/query.goand its redshift and cockroachdb siblings.git diff v5.12.0is now the two-lineColumnTypePrecisionScalepatch and nothing else.go test ./stdlib/passes against PostgreSQL 17.🤖 Generated with Claude Code