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
> > probably be to have a subclass of the dialect for each server version.
> > MySQL seems to have about 5 :)
> > http://www.hibernate.org/hib_docs/v3/api/org/hibernate/dialect/package-summary.html.
>
> 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
> approach is good too, because we can get different behaviors in each
> version of the database.
I've posted files to pgsql-patches, as well as to Diego directly.
There are 3 files
PostgreSQL8Dialect.java which implements enough for 8.0 and 8.1
PostgreSQL82Dialect.java which extends PostgreSQL8Dialect
PostgreSQL83Dialect.java which extends PostgreSQL8Dialect
PostgreSQL8Dialect is not provided as a patch because the extensions
have all been re-ordered to match the underlying sequence and grouping
in the base Dialect file. Checking it should be much easier now.
I've not checked 7.x compatibility
We can then push out a new file every release.
Notes:
- Not sure when getCascadeConstraintsString() gets called, so left it
unset
- Not added any keywords. Some Dialects add a few keywords, but there
doesn't seem to be any pattern to it. Any advice?
- GUID support is possible, but really opens up the debate about how
extensibility features should be handled.
- For now, I think we should document the procedure for adding a local
site Dialect which implements additional functions, with GUID as an
example
Comments?
-- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com