Re: getXXX methods - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: getXXX methods
Date
Msg-id 40EB5683.90301@opencloud.com
Whole thread Raw
In response to Re: getXXX methods  (Kris Jurka <books@ejurka.com>)
Responses Re: getXXX methods
List pgsql-jdbc
Kris Jurka wrote:

> The
> DataTruncation API is organized around byte sizes and just doesn't seem
> right for numeric data.

There is support throughout that API for "unknown sizes" which seems
appropriate when you're not dealing with explicitly-sized types. And
even types such as varchar don't map directly to bytes anyway..

> Even if the spec does imply that a warning
> shuold be issued (which is not clear to me), I can't imagine why
> anyone would want this.  If I want truncation I'll do it myself, otherwise
> I want any error to immediately raise a red flag and put the brakes on
> processing.

I tend to agree -- but Dave evidently has a use for it, in which case
truncation+warning seems a lesser evil than silent truncation.

> How many people really check for warnings anyway?

I hate this argument. If we don't generate any warnings, of course no
one will check for them!

-O

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: getXXX methods
Next
From: Kris Jurka
Date:
Subject: Re: getXXX methods