Re: JBoss w/int8 primary keys in postgres ... - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: JBoss w/int8 primary keys in postgres ...
Date
Msg-id 20030908151855.C32666@bacon
Whole thread Raw
In response to Re: JBoss w/int8 primary keys in postgres ...  (James Robinson <jlrobins@socialserve.com>)
Responses Re: JBoss w/int8 primary keys in postgres ...  (James Robinson <jlrobins@socialserve.com>)
List pgsql-jdbc
On 07/09/2003 20:09 James Robinson wrote:
>
> On Sunday, September 7, 2003, at 06:44  AM, Paul Thomas wrote:
>
>> It would need to settable in the url string to be used in an EJB
>> container.
>>
>> Comments?
>
>
> Well, reading the associated threads more closely, I see that Tom
> announced that there was a proposed fix in the backend for 7.4 (see
> http://archives.postgresql.org/pgsql-jdbc/2002-10/msg00164.php). I'm
> cooking 7.4B2 right now to see if anything is indeed different. But,
> given the most recent discussion in performance-land, dated this past
> Friday, I'm not expecting too much.

Looking at the cvs HEAD sources, there's nothing there that would help you.

> A backend fix would be the clearest answer, since the principle of least
> surprise is being violated by the backend, not the JDBC driver. I'm just
> not sure if that is/will be done in a timely enough fashon, given I have
> this problem *now*, and our particular frontend-of-choice can indeed
> inject a lossless cast in the setLong() path (and, likewise, perhaps a
> '::int2' for the setShort() path as well).
>

Whether you consider PGs very tight typing a bug or not is a matter of
opinion. It probably would help if the BE could do type promotion
(int2->int4->int8). But that would only help those using that particular
version of PG. As the JDBC driver is designed to work for current + many
past releases of PG, modifications along the line I've proposed would also
help users of older versions of PG and provide fairly consistent behavior
across versions.

> CMP will be the death of us all.

No, just those who choose to go the EJB route. My preference is DAO.

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-jdbc by date:

Previous
From: Zak McGregor
Date:
Subject: Re: Resultset funnies...
Next
From: Kris Jurka
Date:
Subject: Re: Copy Command