Closed leotu closed 6 years ago
can you clarify what "using PG" means ?
”Based on PostgreSQL”
it is not clear enough, do you have some examples ?
I can use JDBC driver to connect PostgreSQL and Greenplum do anything. Also to connect to PostgreSQL by "reactive-pg-client" without any problem and I sure it should be working stablly.
The question is that: Does "reactive-pg-client" officially support Greenplum when using it in production environment ? Or any plan to test Greenplum let it compatible ?
jdbc: (PostgreSQL and Greenplum both OK)
Class.forName("org.postgresql.Driver");
Connection db = DriverManager.getConnection("jdbc:postgresql://...", "...","...");
Statement st = db.createStatement();
ResultSet rs = st.executeQuery("SELECT ouid, name FROM company WHERE status_flag = 'Y'");
while (rs.next()) {
log.debug("rs.ouid: {}, name: {}", rs.getString("ouid"), rs.getString("name"));
}
rs.close();
st.close();
db.close();
reactive-pg-client: (PostgreSQL OK but Greenplum error)
PgPoolOptions options = new PgPoolOptions() //
.setPort(...) //
.setHost(...) //
.setDatabase(...) //
.setUser(...) //
.setPassword(...) //
.setMaxSize(5);
PgPool client = PgClient.pool(options);
client.query("SELECT ouid, name FROM company WHERE status_flag = 'Y'", ar -> {
if (ar.succeeded()) {
PgRowSet result = ar.result();
result.forEach(row -> {
log.debug("row.ouid: {}, name: {}", row.getString("ouid"), row.getString("name"));
});
} else {
log.error("Failure: ", ar.cause());
}
// Now close the pool
client.close();
});
Connect Greenplum raise error message: "io.vertx.core.impl.NoStackTraceThrowable: utf8 is not supported in the client only UTF8"
My Greenplum Version is
SELECT version()
PostgreSQL 8.2.15 (Greenplum Database 4.3.99.00 build dev) compiled on Jun 20 2018 15:34:14
ok, that's clear now.
can you tell me how to reproduce your issue (perhaps with docker or with a way to have an accnount) with green plum to look at error ?
to be honest it seems the error seems to be because the current client uses case sensitive UTF8 parsing.
so far we only dealt with postgres that sends UTF8 string and this seems to send utf8 string, so it should be easy to fix.
@leotu I've commited this https://github.com/reactiverse/reactive-pg-client/commit/2a3c37a2a7350d46a6432bfbad50a731ab611e05 and I think it should solve the actual problem you encountered, a snapshot should be deployed by the CI in the Sonatype OSS snapshot repository.
Great! The "0.10.1-SNAPSHOT" version fixed this problem. I can fetch data without any error.
https://oss.sonatype.org/content/repositories/snapshots/io/reactiverse/reactive-pg-client/
awesome, I'll cut a 0.10.1 release soon
The Greenplum is using PG, is it supported ? https://greenplum.org/