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
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend