Skip to content
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

More robust PostgreSQL version detection #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pitkali
Copy link

@pitkali pitkali commented Jun 28, 2019

The version check only worked with pg_config reporting 3-component
version number and no extra information. This does not work with libpq
as available in Ubuntu repositories, which both (a) only reports major
and minor version components, and (b) adds more information in the
parens afterwards.

But only major and minor are actually used, so just read those in and
slurp the rest of the line.

Fixes #4.

The version check only worked with pg_config reporting 3-component
version number *and* no extra information. This does not work with libpq
as available in Ubuntu repositories, which both (a) only reports major
and minor version components, and (b) adds more information in the
parens afterwards.

But only major and minor are actually used, so just read those in and
slurp the rest of the line.

Fixes jensl#4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostgreSQL version parsed incorrectly for Ubuntu 18.04/PSQL 10.9
1 participant