Docs for https://github.com/pgdogdev/pgdog/pull/1541 - #114
Merged
Merged
Conversation
Deploying pgdog-docs with
|
| Latest commit: |
8706997
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://25092acf.pgdog-docs.pages.dev |
| Branch Preview URL: | https://jk-omni-writes-1541.pgdog-docs.pages.dev |
jkaczman
added a commit
to pgdogdev/pgdog
that referenced
this pull request
Sep 16, 2026
…1541) When we perform an `INSERT` into an omnisharded table, right now, the functions within the statement (or `COLUMN_DEFAULT` in the table schema) are executed separately on each shard. In the case of time/date functions, this means that they will drift slightly apart, as their execution time will not be the exact same. To fix this, this PR re-writes all those time/date functions ([Postgres ref](https://www.postgresql.org/docs/current/functions-datetime.html)), specifically: `current_date`, `current_time`, `current_timestamp`, `clock_timestamp`, `localtime`, `localtimestamp`, `now`, `statement_timestamp`, `timeofday`, and `transaction_timestamp`. It handles both calls within a `VALUES` list, as well as is compatible with functions specified within `COLUMN_DEFAULT` in the table schema. It's also compatible with simple protocol, extended protocol, and prepare/execute. Refactoring: - Pushed `TransactionType` into a `Transaction` type, so that the time the transaction started could be saved for use with now() / other functions that rely on transaction start time. - Created a `PreparedPlan` type to encapsulate everything the PreparedStatement cache stores for Prepare statements (instead of passing around separate fields in a tuple). - Pushed `GeneratedId` and its corresponding parameter number into a `GeneratedParam` type. Shortfalls: - If the client specified a timezone, it only works with strings like "UTC" and "America/New_York"; Postgres supports other types such as `INTERVAL '-08:00' HOUR TO MINUTE`. Right now it errors to prevent incorrect behavior falling through. We previously didn't support any kind of timezone parsing whatsoever. Docs: pgdogdev/docs#114. Helm: pgdogdev/helm#140. Fixes #1521.
Contributor
|
The CI failed the first time because the enterprise image didn't have the config change yet. We're basically testing all documented configs against the latest EE image to make sure they are valid. |
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.
No description provided.