pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: List <pgsql-jdbc@postgresql.org>
Subject: Re: jdbc cts final diff for review
Date: Thu, 30 Jun 2005 19:45:18 -0400
Message-ID: <82606823-092A-4BFE-89C4-8ADCA730AC70@fastcrypt.com> (raw)
In-Reply-To: <42C31F86.8050205@opencloud.com>
References: <688EEEFD-78B1-4C09-8CE8-E17520725AA2@fastcrypt.com>
	<42C29F6D.4060001@opencloud.com>
	<1F04D083-97E3-4C00-8806-B107991AE27E@fastcrypt.com>
	<42C31F86.8050205@opencloud.com>

see attached

I've changed direction to an array, and cleaned up the test cases.
regarding the jdbc3 type conversion in registerOutParameter, an  
existing conversion (BIT to BOOLEAN) was there, do all of them need  
to be in jdbc2 ?



See my comments below.




On 29-Jun-05, at 6:24 PM, Oliver Jowett wrote:

> Dave Cramer wrote:
>
>
>>> You seem to have reverted your earlier changes and put back the
>>> types/* classes -- why?
>>>
>>
>> huh ? they should be in there in HEAD, I did remove the creation  
>> of an
>> object, and went to static methods
>>
I moved them from to core/types, but they have always been there
>
> HEAD went through this progression:
>
> (1) no types/*
> (2) you added types/PGByte, etc
> (3) you removed types/* and added static methods
>
> Your patch does things like this:
>
>
>> --- 1500,1520 ----
>>           preparedParameters.clear();
>>       }
>>
>> !     private PGType createInternalType( Object x, int  
>> targetType ) throws PSQLException
>>       {
>> !         if ( x instanceof Byte ) return PGByte.castToServerType 
>> ((Byte)x, targetType );
>> !         if ( x instanceof Short ) return PGShort.castToServerType 
>> ((Short)x, targetType );
>> !         if ( x instanceof Integer ) return  
>> PGInteger.castToServerType((Integer)x, targetType );
>> !         if ( x instanceof Long ) return PGLong.castToServerType 
>> ((Long)x, targetType );
>> !         if ( x instanceof Double ) return  
>> PGDouble.castToServerType((Double)x, targetType );
>> !         if ( x instanceof Float ) return PGFloat.castToServerType 
>> ((Float)x, targetType );
>> !         if ( x instanceof BigDecimal) return  
>> PGBigDecimal.castToServerType((BigDecimal)x, targetType );
>> !         // since all of the above are instances of Number make  
>> sure this is after them
>> !         if ( x instanceof Number ) return  
>> PGNumber.castToServerType((Number)x, targetType );
>> !         if ( x instanceof Boolean) return  
>> PGBoolean.castToServerType((Boolean)x, targetType );
>> !         return new PGUnknown(x);
>>
>> +     }
>>       // Helper method for setting parameters to PGobject subclasses.
>>       private void setPGobject(int parameterIndex, PGobject x)  
>> throws SQLException {
>>           String typename = x.getType();
>>
>
> which seems to be reverting back to step (2)
>
> I'm guessing you forgot to apply the changes in (3) to your working  
> copy
> of the driver, then diffed against current HEAD..
>
> -O
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>

Attachments:

  callable0630.diff.gz (application/x-gzip, 9.8K) download

view thread (10+ messages)  latest in thread

Message-ID: <82606823-092A-4BFE-89C4-8ADCA730AC70@fastcrypt.com>
Permalink:  ../82606823-092A-4BFE-89C4-8ADCA730AC70@fastcrypt.com/
Also on:    postgresql.org/message-id/82606823-092A-4BFE-89C4-8ADCA730AC70@fastcrypt.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: pg@fastcrypt.com
  Subject: Re: jdbc cts final diff for review
  In-Reply-To: <82606823-092A-4BFE-89C4-8ADCA730AC70@fastcrypt.com>
  References: <688EEEFD-78B1-4C09-8CE8-E17520725AA2@fastcrypt.com> <42C29F6D.4060001@opencloud.com> <1F04D083-97E3-4C00-8806-B107991AE27E@fastcrypt.com> <42C31F86.8050205@opencloud.com> <82606823-092A-4BFE-89C4-8ADCA730AC70@fastcrypt.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