-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapter: expose Materialize version in mz_version parameter
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
- Loading branch information
Showing
9 changed files
with
106 additions
and
43 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
Oops, something went wrong.