Re: [hibernate-team] PostgreSQLDialect

From: "Tom Dunstan" <pgsql(at)tomd(dot)cc>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "Dave Cramer" <davec(at)fastcrypt(dot)com>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Diego Pires Plentz" <diego(dot)pires(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [hibernate-team] PostgreSQLDialect
Date: 2007-11-12 16:33:03
Message-ID: ca33c0a30711120833ud116f2bme84f51d1ba4a8fd3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Nov 12, 2007 4:08 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Sabino Mullane 2007-11-12 16:43:09 Re: plperl and regexps with accented characters - incompatible?
Previous Message Heikki Linnakangas 2007-11-12 16:22:36 Re: Simplifying Text Search