From: | dmp <danap(at)ttc-cmc(dot)net> |
---|---|
To: | PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | PostgreSQL pgjdbc Datatypes Info |
Date: | 2015-11-04 18:02:54 |
Message-ID: | 563A484E.6000307@ttc-cmc.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hello,
I follow the PostgreSQL data types information that can be
generated with the pgjdbc for one of my projects. For anyone
interested this is the mapping for the latest for a table of
each of the basic types.
danap
Created by: PostgreSQL 9.4.1, JDBC 9.4.0-1205
tableMetaData.getColumnLabel(i);
tableMetaData.getColumnClassName(i);
tableMetaData.getColumnType(i);
tableMetaData.getColumnTypeName(i);
tableMetaData.getScale(i);
tableMetaData.getPrecision(i);
tableMetaData.getColumnDisplaySize(i);
index Name Class Type Type Name Scale Precision Size
1 data_type_id java.lang.Integer 4 serial 0 10 11
2 smallint_type java.lang.Integer 5 int2 0 5 6
3 int_type java.lang.Integer 4 int4 0 10 11
4 bigint_type java.lang.Long -5 int8 0 19 20
5 decimal_type java.math.BigDecimal 2 numeric 2 16 18
6 numeric_type java.math.BigDecimal 2 numeric 2 10 12
7 real_type java.lang.Float 7 float4 8 8 15
8 doubleprecision java.lang.Double 8 float8 17 17 25
9 serial_type java.lang.Integer 4 serial 0 10 11
10 bigserial_type java.lang.Long -5 bigserial 0 19 20
11 varchar_type java.lang.String 12 varchar 0 30 30
12 char_type java.lang.String 1 bpchar 0 30 30
13 text_type java.lang.String 12 text 0 2147483647 2147483647
14 bytea_type [B -2 bytea 0 2147483647 2147483647
15 date_type java.sql.Date 91 date 0 13 13
16 time_type java.sql.Time 92 time 6 15 15
17 timetz_type java.sql.Time 92 timetz 6 21 21
18 timestamp_type java.sql.Timestamp 93 timestamp 6 29 29
19 timestamptz java.sql.Timestamp 93 timestamptz 6 35 35
20 interval_type util.PGInterval 1111 interval 6 49 49
21 boolean_type java.lang.Boolean -7 bool 0 1 1
22 point_type geometric.PGpoint 1111 point 0 2147483647 2147483647
23 linesegment geometric.PGlseg 1111 lseg 0 2147483647 2147483647
24 box_type geometric.PGbox 1111 box 0 2147483647 2147483647
25 path_type geometric.PGpath 1111 path 0 2147483647 2147483647
26 polygon_type geometric.PGpolygon 1111 polygon 0 2147483647 2147483647
27 circle_type geometric.PGcircle 1111 circle 0 2147483647 2147483647
28 cidr_type java.lang.Object 1111 cidr 0 2147483647 2147483647
29 inet_type java.lang.Object 1111 inet 0 2147483647 2147483647
30 macaddr_type java.lang.Object 1111 macaddr 0 2147483647 2147483647
31 bit2_type java.lang.Boolean -7 bit 0 2 2
32 bitvarying5 java.lang.Object 1111 varbit 0 5 5
From | Date | Subject | |
---|---|---|---|
Next Message | John Harvey | 2015-11-04 19:06:14 | Re: Today's pgjdbc release causing git clone issues |
Previous Message | Dave Cramer | 2015-11-04 12:11:51 | Re: Today's pgjdbc release causing git clone issues |