Re: Postgres to Java type mapping - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Postgres to Java type mapping
Date
Msg-id 011201c19ae2$bd2e7770$c201a8c0@inspiron
Whole thread Raw
In response to Postgres to Java type mapping  ("Paulo Merson" <paulo@summa-tech.com>)
List pgsql-jdbc
Paulo,

TEXT maps to String
TIMESTAMP maps to Timestamp
SERIAL maps to Integer

The rest are not in the jdbc spec, and as a result do not map directly.
However since postgres returns strings for everything you can map them
to a String and then manipulate the underlying byte buffer.

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Paulo Merson
Sent: Friday, January 11, 2002 2:47 PM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] Postgres to Java type mapping


Hello,

I'd appreciate if anyone could indicate what is the recommended Java
type (or class) to map the following Postgres SQL types. I couldn't find
any document or previous message with such information.

SERIAL
TEXT
TIMESTAMP
BIT(n)
BIT VARYING(n)
INET
MACADDR
CIDR

Thank's,

Paulo Merson
Summa Technologies - www.summa-tech.com


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly



pgsql-jdbc by date:

Previous
From: "Dave Cramer"
Date:
Subject: Re: compiling jdbc driver using java version 1.4.0 beta3 and postgresql 7.1.3
Next
From: Timo Savola
Date:
Subject: Re: ResultSet memory usage