VMware vFabric Postgres - Could not determine version from string

Issue #2819 resolved
Former user created an issue

SQL Alchemy Version: 0.8.2 Python Version: 3.3 Postgres Version: 9.2.4.0

We are using VMware vFabric Postgres with SQLAlchemy. Unfortunately the version string returned by {{{select version()}}} isn't accounted for properly.

Here is the string: {{{9.2.4 VMware vFabric Postgres 9.2.4.0 release build 1080137}}}

The version check is located at: ''sqlalchemy/dialects/postgresql/base.py'' line 1547.

The check uses re.match, which looks for the match only at the beginning of the string. The brackets in the return string (shown above) cause the match to fail.

I changed re.match to re.search and this fixed the problem in my tests.

Comments (6)

  1. Yury Zhuravlev

    Not working with PostgresPro version string. We have many Postgres forks with own strings. I think it is necessary to remove this check.

  2. Mike Bayer repo owner

    @stalkberg detecting the version of Postgresql in use is required. Removing the check altogether is not a solution. If non standard forks of Postgresql are in use, they should either submit PRs to the SQLAlchemy project in order to detect their strings correctly or they should use their own SQLAlchemy dialects (e.g. such as Redshift does).

  3. Log in to comment