Re: [hibernate-team] PostgreSQLDialect - Mailing list pgsql-hackers

From Tom Dunstan
Subject Re: [hibernate-team] PostgreSQLDialect
Date
Msg-id ca33c0a30711120833ud116f2bme84f51d1ba4a8fd3@mail.gmail.com
Whole thread Raw
In response to Re: [hibernate-team] PostgreSQLDialect  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [hibernate-team] PostgreSQLDialect  (Dave Cramer <davec@fastcrypt.com>)
List pgsql-hackers
On Nov 12, 2007 4:08 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> > What should the driver report then ? I believe the backend code considers 8
> > to be the major version, and 0123 to be the minor versions ?
>
> No, 8.1 is the major version.  In 8.2.5, 8.2 is the major, 5 is the
> minor version.

Which is nice in theory, except that the JDBC API doesn't give us the
option of a non-int major version number. We could fudge it with 80,
81 etc, but that's pretty ugly. You can imagine some database client
out there reporting that you're connected to a postgresql 82.5
database, rather than using the getDatabaseProductVersion() method
which is intended for that sort of thing.

For the most part, getting the combination of the major and minor
numbers as currently implemented should be enough for anything using
the driver, as we normally don't care about the difference between
8.2.1 and 8.2.2 in application code (heaven help mysql :)). It only
came up in this case because the minor number (as reported by the JDBC
driver) wasn't passed through.

Cheers

Tom


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Simplifying Text Search
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: [GENERAL] plperl and regexps with accented characters - incompatible?