this.odbcProxy.terminate();
return message;
}
private Object buildInitialize(NullTerminatedStringDataInputStream data) throws IOException{
Properties props = new Properties();
int version = data.readInt();
props.setProperty("version", Integer.toString(version));
// SSL Request
if (version == 80877103) {
this.initialized = false;
this.odbcProxy.sslRequest();
return message;
}
trace("StartupMessage version", version, "(", (version >> 16), ".", (version & 0xff), ")");
while (true) {
String param = data.readString();
if (param.length() == 0) {
break;
}
String value = data.readString();
props.setProperty(param, value);
}
this.user = props.getProperty("user");
this.databaseName = props.getProperty("database");
String clientEncoding = props.getProperty("client_encoding", "UTF-8");
props.setProperty("client_encoding", clientEncoding);
props.setProperty("default_transaction_isolation", "read committed");
props.setProperty("DateStyle", "ISO");
props.setProperty("TimeZone", Calendar.getInstance().getTimeZone().getDisplayName());
Charset cs = PGCharsetConverter.getCharset(clientEncoding);
if (cs != null) {
this.encoding = cs;
}
this.odbcProxy.initialize(props);