-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
44812: tree: modify TimestampTZ operators to use ctx loc for operations r=solongordon a=otan Resolve cockroachdb/django-cockroachdb#54. This PR involves my audit of eval.go and builtins.go to make sure all TimestampTZ operations are performed in the context timezone for TimestampTZ. Results are described in the release note. Important to note we can't parse everything as the current context location, because it can be subject to change mid-session. Release note (bug fix, sql change): Previously, some TimestampTZ operations did not correctly take context timezone (set by `SET TIME ZONE`) into account. This caused a few bugs: * it leads to bugs involving daylight saving in arithmetic, e.g. with `America/Chicago`, evaluating '2010-11-06 23:59:00-05'::timestamptz + '1 day'::interval would return incorrect results as it assumed it was a fixed offset of `-5` instead. * text conversion from timestamptz to string sometimes used the wrong timezone offset if the location of the session does not match the location when the timestamptz was parsed. * to_json builtins with timestamptz does not take session timezone into consideration. These have all been fixed by the PR. 44819: sql: refactor system.namespace calls to use indexes where available r=solongordon a=otan Resolves #44230. Refactoring all system.namespace calls such that they always use indexes when querying data if it previously used indexes before. I left `crdb_internal.lookup_namespace_id` as functional as it was before in that it does not lookup anything that isn't a public schema or database. This is because the admin UI only looks up tables into the public schema. Release note: None Co-authored-by: Oliver Tan <[email protected]>
- Loading branch information
Showing
19 changed files
with
190 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.