-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't run EXPLAIN nullability analysis on Materialize #2282
Merged
Conversation
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
benesch
added a commit
to benesch/materialize
that referenced
this pull request
Jan 8, 2023
This commit exposes the Materialize-specific information in a new `mz_version` parameter, as in: materialize=> show mz_version; mz_version ------------------------- v0.39.0-dev (73f6bed) (1 row) The `mz_version` parameter is additionally added to set of parameters that are automatically sent to the client during part of startup. This approach comes from CockroachDB, and allows clients to easily detect whether they're talking to Materialize or PostgreSQL without incurring an additional roundtrip. I already have a PR out to sqlx [0] that uses this feature to automatically disable PostgreSQL-specific features that Materialize does not support. The version string matches the output of the `mz_version()` function. The implementation is somewhat irritating, as it requires plumbing the `BuildInfo` from the adapter into each session. Doesn't turn out too complicated, though, now that it's all written out. [0]: launchbadge/sqlx#2282
4 tasks
benesch
added a commit
to benesch/materialize
that referenced
this pull request
Jan 8, 2023
This commit exposes the Materialize-specific information in a new `mz_version` parameter, as in: materialize=> show mz_version; mz_version ------------------------- v0.39.0-dev (73f6bed) (1 row) The `mz_version` parameter is additionally added to the parameter set that is automatically sent to the client during part of startup. This approach comes from CockroachDB, and allows clients to easily detect whether they're talking to Materialize or PostgreSQL without incurring an additional roundtrip. I already have a PR out to sqlx [0] that uses this feature to automatically disable PostgreSQL-specific features that Materialize does not support. The version string matches the output of the `mz_version()` function. The implementation is somewhat irritating, as it requires plumbing the `BuildInfo` from the adapter into each session. Doesn't turn out too complicated, though, now that it's all written out. [0]: launchbadge/sqlx#2282
benesch
added a commit
to MaterializeInc/materialize
that referenced
this pull request
Jan 9, 2023
This commit exposes the Materialize-specific information in a new `mz_version` parameter, as in: materialize=> show mz_version; mz_version ------------------------- v0.39.0-dev (73f6bed) (1 row) The `mz_version` parameter is additionally added to the parameter set that is automatically sent to the client during part of startup. This approach comes from CockroachDB, and allows clients to easily detect whether they're talking to Materialize or PostgreSQL without incurring an additional roundtrip. I already have a PR out to sqlx [0] that uses this feature to automatically disable PostgreSQL-specific features that Materialize does not support. The version string matches the output of the `mz_version()` function. The implementation is somewhat irritating, as it requires plumbing the `BuildInfo` from the adapter into each session. Doesn't turn out too complicated, though, now that it's all written out. [0]: launchbadge/sqlx#2282
abonander
force-pushed
the
main
branch
2 times, most recently
from
February 21, 2023 22:56
6cf15b0
to
eade49c
Compare
@benesch the Postgres driver was moved into a subdirectory, can you rebase please? |
Materialize [0] is a PostgreSQL-like database that, similar to CockroachDB, does not support PostgreSQL's `EXPLAIN` output. Extend the fix from PR launchbadge#1248 to Materialize, too, so that sqlx can still be used with Materialize. See launchbadge#1248. [0]: https://materialize.com
Sure! Done. |
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.
Materialize 0 is a PostgreSQL-like database that, similar to CockroachDB, does not support PostgreSQL's
EXPLAIN
output. Extend the fix from PR #1248 to Materialize, too, so that sqlx can still be used with Materialize.See #1248.