pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: dmp <danap@ttc-cmc.net>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: TypeInfoCache
Date: Fri, 21 Dec 2007 13:18:06 -0700
Message-ID: <476C1F7E.5020004@ttc-cmc.net> (raw)
In-Reply-To: <476AD9D7.6050708@opencloud.com>
References: <47692DEB.9070307@ikoffice.de>
	<877ijan2cp.fsf@oxford.xeocode.com>
	<47693B10.3040804@ikoffice.de>
	<873atymzpu.fsf@oxford.xeocode.com>
	<4769604A.9050006@ikoffice.de>
	<476989C7.8020307@opencloud.com>
	<1811.1198113944@sss.pgh.pa.us>
	<476A4AB7.90509@ikoffice.de>
	<11679.1198165116@sss.pgh.pa.us>
	<476A9083.80407@ikoffice.de>
	<32821.216.129.226.71.1198167314.squirrel@www.webmail.mtintouch.net>
	<476AD9D7.6050708@opencloud.com>

This is the standard output I obtain from a database about
its data types. I use the defined data types from manuals. This
is important to the MyJSQLView program because if a database
defines a data type I need to assume that a user somewhere
will use it so I have to be able to handle it. This seems sensible
from the perspective of a generic database GUI access too. I
admit two areas I have not addressed yet in the current version
of the application are user defined and arrays. Noticed the asterisked
rows. These are data types that are specific to PostgreSQL. Granted
each database is going to have a few of these. Notice the returned
Class & Type. The 'object' class returned are fine for the Network
Address types, since the Sun Java JDBC defines methods for objects
in the getter/setter methods, but the the Interval and Geometric data
types return specific types that are not defined by the Sun Java JDBC,
'PGxxx'. I have learned how to properly handle these types without
importing them from the org.postgresql driver, but I would call them
deviants. By the way importing such deviants from a database driver
in a generic GUI is not particular acceptable. Maybe I'm missing
something there; Anyway I would think that standard data types should
really relate more to hardware and the the specifics of the nature of
program's, in this case database, requirements. Example blob/bytea.
This is a obvious specific to a database program and so therefore should
be an extension to the standard data types. If points and circles are going
to be added is then next perhaps mole?

danap

-----------------------
PostgreSQL 8.2.5

ColumnName, Modified ColumnName, ColumnClassName, ColumnClassType, 
ColumnPreferedSize

1 data_type_id Data Type Id java.lang.Integer int4 11
2 smallint_type Smallint Type java.lang.Integer int2 6
3 int_type Int Type java.lang.Integer int4 11
4 bigint_type Bigint Type java.lang.Long int8 20
5 decimal_type Decimal Type java.math.BigDecimal numeric 18
6 numeric_type Numeric Type java.math.BigDecimal numeric 12
7 real_type Real Type java.lang.Float float4 14
8 doubleprecision_type Doubleprecision Type java.lang.Double float8 24
9 serial_type Serial Type java.lang.Integer int4 11
10 bigserial_type Bigserial Type java.lang.Long int8 20
11 varchar_type Varchar Type java.lang.String varchar 30
12 char_type Char Type java.lang.String bpchar 30
13 text_type Text Type java.lang.String text 2147483647
14 bytea_type Bytea Type [B bytea 2147483647
15 date_type Date Type java.sql.Date date 13
16 time_type Time Type java.sql.Time time 15
17 timetz_type Timetz Type java.sql.Time timetz 21
18 timestamp_type Timestamp Type java.sql.Timestamp timestamp 29
19 timestamptz_type Timestamptz Type java.sql.Timestamp timestamptz 35
*20 interval_type Interval Type org.postgresql.util.PGInterval interval 49
21 boolean_type Boolean Type java.lang.Boolean bool 1
*22 point_type Point Type org.postgresql.geometric.PGpoint point 2147483647
*23 linesegment_type Linesegment Type org.postgresql.geometric.PGlseg 
lseg 2147483647
*24 box_type Box Type org.postgresql.geometric.PGbox box 2147483647
*25 path_type Path Type org.postgresql.geometric.PGpath path 2147483647
*26 polygon_type Polygon Type org.postgresql.geometric.PGpolygon polygon 
2147483647
*27 circle_type Circle Type org.postgresql.geometric.PGcircle circle 
2147483647
*28 cidr_type Cidr Type java.lang.Object cidr 2147483647
*29 inet_type Inet Type java.lang.Object inet 2147483647
*30 macaddr_type Macaddr Type java.lang.Object macaddr 2147483647
31 bit2_type Bit2 Type java.lang.Boolean bit 2
32 bitvarying2_type Bitvarying2 Type java.lang.Object varbit 5



view thread (32+ messages)  latest in thread

Message-ID: <476C1F7E.5020004@ttc-cmc.net>
Permalink:  ../476C1F7E.5020004@ttc-cmc.net/
Also on:    postgresql.org/message-id/476C1F7E.5020004@ttc-cmc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: danap@ttc-cmc.net, oliver@opencloud.com
  Subject: Re: TypeInfoCache
  In-Reply-To: <476C1F7E.5020004@ttc-cmc.net>
  References: <47692DEB.9070307@ikoffice.de> <877ijan2cp.fsf@oxford.xeocode.com> <47693B10.3040804@ikoffice.de> <873atymzpu.fsf@oxford.xeocode.com> <4769604A.9050006@ikoffice.de> <476989C7.8020307@opencloud.com> <1811.1198113944@sss.pgh.pa.us> <476A4AB7.90509@ikoffice.de> <11679.1198165116@sss.pgh.pa.us> <476A9083.80407@ikoffice.de> <32821.216.129.226.71.1198167314.squirrel@www.webmail.mtintouch.net> <476AD9D7.6050708@opencloud.com> <476C1F7E.5020004@ttc-cmc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox