From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Dunstan <pgsql(at)tomd(dot)cc> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, Diego Pires Plentz <diego(dot)pires(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [hibernate-team] PostgreSQLDialect |
Date: | 2007-11-11 18:53:55 |
Message-ID: | 1194807235.2644.47.camel@ebony.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2007-11-11 at 17:11 +0000, 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.
On Sun, 2007-11-11 at 17:11 +0000, Tom Dunstan wrote:
> > - You map "text" to CLOB. Not exactly sure what CLOB refers to but text
> > column are not generally used for large objects. I mean, you can store
> > up to a GB in them, but most such columns are not going to be large.
>
> Actually, it's clob being mapped to text. I don't see a huge problem
> with that, really, it'll often be mapped to a String at the java end
> anyway.
Agreed.
---
Here's my thoughts on compatibility:
The getForUpdateString(String aliases) is incorrect because Postgres
doesn't lock columns. The default, which ignores the columns specified,
is correct for Postgres.
Most PostgreSQL Dialects should add these:
------------------------------------------
public boolean supportsPooledSequences() {
return true;
}
public String[] getCreateSequenceStrings(String sequenceName, int
initialValue, int incrementSize) throws MappingException {
return "create sequence " + sequenceName + " INCREMENT BY " + toString(incrementSize) + " START WITH " + toString(initialValue);
}
public boolean supportsLimitOffset() {
return true;
}
public boolean supportsUnique() {
return true;
}
public boolean supportsVariableLimit() {
return true;
}
PostgreSQL82Dialect and beyond should add these
-----------------------------------------------
public boolean supportsIfExistsBeforeTableName() {
return true;
}
/* FOR UPDATE NOWAIT */
public String getForUpdateNowaitString() {
return getForUpdateString() + " NOWAIT";
}
public boolean supportsRowValueConstructorSyntax() {
return true;
}
PostgreSQL83Dialect adds
-----------------------------------------------
Nothing new AFAICS?
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2007-11-11 19:35:40 | Re: [hibernate-team] PostgreSQLDialect |
Previous Message | Diego Pires Plentz | 2007-11-11 18:48:00 | Re: [hibernate-team] PostgreSQLDialect |