diff --git a/pom.xml b/pom.xml index fce3351..6fdb629 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.alaisi.pgasync postgres-async-driver - 0.10-SNAPSHOT + 0.10.ryan postgres-async-driver Asynchronous PostgreSQL Java driver diff --git a/src/main/java/com/github/pgasync/impl/PgConnection.java b/src/main/java/com/github/pgasync/impl/PgConnection.java index efc42e8..4c5a671 100644 --- a/src/main/java/com/github/pgasync/impl/PgConnection.java +++ b/src/main/java/com/github/pgasync/impl/PgConnection.java @@ -17,7 +17,7 @@ import static com.github.pgasync.impl.message.RowDescription.ColumnDescription; import java.util.ArrayList; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; @@ -184,7 +184,7 @@ public void onCompleted() { } static Map getColumns(ColumnDescription[] descriptions) { - Map columns = new HashMap<>(); + Map columns = new LinkedHashMap<>(); for (int i = 0; i < descriptions.length; i++) { columns.put(descriptions[i].getName().toUpperCase(), new PgColumn(i, descriptions[i].getType())); } diff --git a/src/main/java/com/github/pgasync/impl/io/ErrorResponseDecoder.java b/src/main/java/com/github/pgasync/impl/io/ErrorResponseDecoder.java index 27d0af1..392607c 100644 --- a/src/main/java/com/github/pgasync/impl/io/ErrorResponseDecoder.java +++ b/src/main/java/com/github/pgasync/impl/io/ErrorResponseDecoder.java @@ -52,7 +52,7 @@ public ErrorResponse read(ByteBuffer buffer) { String code = null; String message = null; - byte[] field = new byte[255]; + byte[] field = new byte[2048]; for (byte type = buffer.get(); type != 0; type = buffer.get()) { String value = getCString(buffer, field); if (type == (byte) 'S') {