Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Dave Cramer
On 12-Nov-07, at 11:33 AM, Tom Dunstan wrote: On Nov 12, 2007 4:08 PM, Alvaro Herrera <[EMAIL PROTECTED]> 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

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 4:08 PM, Alvaro Herrera <[EMAIL PROTECTED]> 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

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Alvaro Herrera
Dave Cramer escribió: > > On 12-Nov-07, at 10:10 AM, Simon Riggs wrote: > >> On Mon, 2007-11-12 at 14:35 +, Tom Dunstan wrote: >>> Nice try :), but as I read the javadoc for DialectFactory it seems to >>> suggest that hibernate gets the major number from our JDBC driver, >>> which dutifully rep

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Dave Cramer
On 12-Nov-07, at 10:10 AM, Simon Riggs wrote: On Mon, 2007-11-12 at 14:35 +, Tom Dunstan wrote: Nice try :), but as I read the javadoc for DialectFactory it seems to suggest that hibernate gets the major number from our JDBC driver, which dutifully reports it as 8. We can extend that so

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 14:35 +, Tom Dunstan wrote: > Nice try :), but as I read the javadoc for DialectFactory it seems to > suggest that hibernate gets the major number from our JDBC driver, > which dutifully reports it as 8. We can extend that so it uses getMinorVersion() also. Personally,

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 13:30 +, Tom Dunstan wrote: > On Nov 12, 2007 10:55 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > I've posted files to pgsql-patches, as well as to Diego directly. > > I dropped them into a Hibernate 3.2.5.ga source tree and ran the > hibernate tests with the 8.3 dialect

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Andrew Dunstan
Tom Dunstan wrote: On Nov 12, 2007 2:13 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: Oh, that's nice. Unfortunately, though. it only seems to support major version number differentiation as an int. Apparently the idea that you might have a version number like 8.3 didn't occur to whoever wr

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 2:13 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > Oh, that's nice. Unfortunately, though. it only seems to support major > > version number differentiation as an int. Apparently the idea that you > > might have a version number like 8.3 didn't occur to whoever wrote it, > > alt

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Andrew Dunstan
Tom Dunstan wrote: On Nov 12, 2007 1:08 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: If we do this, then it looks like we can hack this file also http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DialectFactory.java Oh, that's nice. Unfortuna

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 1:08 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > If we do this, then it looks like we can hack this file also > http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DialectFactory.java Oh, that's nice. Unfortunately, though. it only seems t

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
> All of this should work for functions, but operators are a whole > different story. I strongly suspect that someone is not going to be > able to use e.g. @@ in a HQL query. Are there ways to do tsearch type > queries just using functions and more standard operators? Of course, if someone's using

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
[oops, sent with non-subscribed from: address first time] On Nov 12, 2007 10:55 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > I've posted files to pgsql-patches, as well as to Diego directly. I dropped them into a Hibernate 3.2.5.ga source tree and ran the hibernate tests with the 8.3 dialect agai

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 10:55 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > I've posted files to pgsql-patches, as well as to Diego directly. I dropped them into a Hibernate 3.2.5.ga source tree and ran the hibernate tests with the 8.3 dialect against pgsql HEAD and got a few errors. Diego, I assume that t

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Peter Eisentraut
Simon Riggs wrote: > On Sun, 2007-11-11 at 17:11 +, Tom Dunstan wrote: > > The way to fix both that and the differing available functions would > > probably be to have a subclass of the dialect for each server version. > > MySQL seems to have about 5 :) > > I think a static dialect for each ser

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 10:55 +, Simon Riggs wrote: > On Sun, 2007-11-11 at 16:48 -0200, Diego Pires Plentz wrote: > > > > > - You have supportsRowValueConstructorSyntax commented out. It does, if > > > > you have a recent enough version, or do you mean something else? > > > > > > The way to fix

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Sun, 2007-11-11 at 16:48 -0200, Diego Pires Plentz wrote: > > > - You have supportsRowValueConstructorSyntax commented out. It does, if > > > you have a recent enough version, or do you mean something else? > > > > The way to fix both that and the differing available functions would > > probabl

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Sun, 2007-11-11 at 23:38 -0500, Andrew Dunstan wrote: > Moreover, Postgres is extensible, so ideally Hibernate should look at > providing a way of querying a database server to get a list of supported > function signatures. > > Not sure how you could handle user defined types automatically,

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Andrew Dunstan
Diego Pires Plentz wrote: I'm thinking the same thing. We could let PostgreSQLDialect to do full support to Postgre 7.x and extend it to support the new features/functions in Postgre 8.x. Btw, to do that, one thing that we must do is identify what functions are new/still avaiable in 8.x. That a

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Josh Berkus
Diego, > Wow, quick responses :-) Hey, anyone wanting to work on drivers is automatically one of our favorite people. FYI, you might want to ping the pgsql-jdbc mailing list as well. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread David Fetter
On Sun, Nov 11, 2007 at 04:48:00PM -0200, Diego Pires Plentz wrote: > Right Tom. The main problem is that hibernate propose is to be > database independent, so, it isn't all databases that has a table > with the list of all functions(and parameters/types to each > function). The "least common den

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Simon Riggs
On Sun, 2007-11-11 at 17:11 +, Tom Dunstan wrote: > The way to fix both that and the differing available functions would > probably be to have a subclass of the dialect for each server version. > MySQL seems to have about 5 :) I think a static dialect for each server version is the way to go.

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Diego Pires Plentz
Wow, quick responses :-) On Nov 11, 2007 3:11 PM, Tom Dunstan <[EMAIL PROTECTED]> wrote: > > Hi, I've never used Hibernate but it seems to be that table of > > functions could be generated automatically. > > That's the obvious solution. It would be nice if the dialect could > query the database i

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Tom Dunstan
> Hi, I've never used Hibernate but it seems to be that table of > functions could be generated automatically. That's the obvious solution. It would be nice if the dialect could query the database itself to get a list of functions, since there will be different sets of functions for different serv

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Martijn van Oosterhout
On Sun, Nov 11, 2007 at 12:04:51PM -0300, Diego Pires Plentz wrote: > I'm trying to improve the support of hibernate to Postgre(and other > databases), but I'm don't have *that* knowledge in database functions and > behavior. I'm already done a couple of improvements, but I'm trying to map > all yo

[HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-11 Thread Diego Pires Plentz
Hi Guys, I'm one of the hibernate(http://hibernate.org) team commiters and I'm here to ask you for a little help :-) I'm trying to improve the support of hibernate to Postgre(and other databases), but I'm don't have *that* knowledge in database functions and behavior. I'm already done a couple of