Skip to content

More robust PostgreSQL version detection#5

Open
pitkali wants to merge 1 commit intojensl:masterfrom
pitkali:fix/postgres-version
Open

More robust PostgreSQL version detection#5
pitkali wants to merge 1 commit intojensl:masterfrom
pitkali:fix/postgres-version

Conversation

@pitkali
Copy link
Copy Markdown

@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