pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Peter Kovacs <maxottovonstirlitz@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: PreparedStatement rounds doubles to scale 14 during update
Date: Wed, 05 Sep 2007 13:07:59 +0100
Message-ID: <46DE9C1F.6030407@enterprisedb.com> (raw)
In-Reply-To: <b6e8f2e80709050442s7439d8ebt345024599931400d@mail.gmail.com>
References: <b6e8f2e80709050227r420d7a3cx751f819fba658854@mail.gmail.com>
	<46DE7E7A.70208@enterprisedb.com>
	<b6e8f2e80709050442s7439d8ebt345024599931400d@mail.gmail.com>

Peter Kovacs wrote:
> Heikki,
> 
> Thank you for your reply.
> 
> What are base-10 datatypes? Are they numeric types? I cannot find them
> in the backend documentation.

I meant any data type that can accurately represent a base-10 decimal
number. In PostgreSQL, that's numeric. In Java, it's BigDecimal.

If you're not familiar with the differences between floating point and
decimal numbers, I'd suggest you to read on it. This python tutorial for
example has a pretty good chapter on the issues:
http://docs.python.org/tut/node16.html

> Is there a mapping of Java types to backend types documented somewhere?

There is for mapping between Java types and SQL types, see "Getting
Started with with the JDBC API" by Sun:

http://java.sun.com/j2se/1.5.0/docs/guide/jdbc/getstart/mapping.html

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com



view thread (13+ messages)  latest in thread

Message-ID: <46DE9C1F.6030407@enterprisedb.com>
Permalink:  ../46DE9C1F.6030407@enterprisedb.com/
Also on:    postgresql.org/message-id/46DE9C1F.6030407@enterprisedb.com

 · 

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: heikki@enterprisedb.com, maxottovonstirlitz@gmail.com
  Subject: Re: PreparedStatement rounds doubles to scale 14 during update
  In-Reply-To: <46DE9C1F.6030407@enterprisedb.com>
  References: <b6e8f2e80709050227r420d7a3cx751f819fba658854@mail.gmail.com> <46DE7E7A.70208@enterprisedb.com> <b6e8f2e80709050442s7439d8ebt345024599931400d@mail.gmail.com> <46DE9C1F.6030407@enterprisedb.com>

* 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