Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
update typeAliases
Browse files Browse the repository at this point in the history
  • Loading branch information
JLDLaughlin committed Mar 5, 2021
1 parent 23eb54b commit db241e4
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions pgjdbc/src/main/java/io/materialize/jdbc/TypeInfoCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,28 @@ public class TypeInfoCache implements TypeInfo {
static {
typeAliases = new HashMap<String, String>();
typeAliases.put("smallint", "int2");

typeAliases.put("i32", "int4");
typeAliases.put("integer", "int4");
typeAliases.put("int", "int4");
typeAliases.put("bigint", "int8");
typeAliases.put("float", "float8");
typeAliases.put("boolean", "bool");
typeAliases.put("decimal", "numeric");

typeAliases.put("i32", "int4");
typeAliases.put("i64", "int8");
typeAliases.put("bigint", "int8");

typeAliases.put("f32", "float4");
typeAliases.put("real", "float4");

typeAliases.put("f64", "float8");
typeAliases.put("double precision", "float8");
typeAliases.put("double", "float8");
typeAliases.put("float", "float8");

typeAliases.put("text", "varchar");
typeAliases.put("string", "varchar");

typeAliases.put("boolean", "bool");
typeAliases.put("decimal", "numeric");
typeAliases.put("json", "jsonb");
}

private String resolveName(String pgTypeName) {
Expand Down

0 comments on commit db241e4

Please sign in to comment.