sql: Add server_version_num session variable#19405
Merged
knz merged 1 commit intocockroachdb:masterfrom Oct 20, 2017
Merged
Conversation
Member
Contributor
|
Hello! Thank you for your contribution! Can you tell us more which ORM motivates this change? It would be best if you could spell it out in the commit message, so that a person who reads the history of the code can get the context for the change. Thank you again! Reviewed 6 of 6 files at r1. Comments from Reviewable |
I've come across an ORM that is using this session vaiable to detect postgres version. Seems ok to support this since server_version is already present. This can make life easier when porting an app from postgres to cockroachdb. Not sure about the type of the var being string type, but I can see other vars that are integers in postgres that are represented as strings here (max_index_keys for example). The specific ORM I've come across is "dat" for Go: https://github.com/mgutz/dat My guess is that other ORMs/frameworks would use this variable too to check postgres version > some version.
14812d4 to
e982537
Compare
Contributor
Author
|
@knz good call, I've update the PR and commit message |
Contributor
|
Thank you! Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from Reviewable |
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.
I've come across an ORM that is using this session vaiable to detect
postgres version. Seems ok to support this since server_version
is already present. This can make life easier when porting an app from
postgres to cockroachdb.
Not sure about the type of the var being string type, but I can see
other vars that are integers in postgres that are represented as strings
here (max_index_keys for example).
The specific ORM I've come across is "dat" for Go: https://github.com/mgutz/dat
My guess is that other ORMs/frameworks would use this variable too to check
postgres version > some version.