pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
jdbccts issues
4+ messages / 2 participants
[nested] [flat]

* jdbccts issues
@ 2005-06-09 01:31 Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Cramer @ 2005-06-09 01:31 UTC (permalink / raw)
  To: pgsql-jdbc

Does anyone know if there is a requirement for callable statements to  
cast the result to the registered type

for instance

registerOutParameter(1, Types.REAL ) and the return type is a double

should we return a Float ?

Dave



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* JDBCCTS issues
@ 2005-07-05 13:18 Dave Cramer <pg@fastcrypt.com>
  2005-07-05 23:05 ` Re: JDBCCTS issues Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Dave Cramer @ 2005-07-05 13:18 UTC (permalink / raw)
  To: pgsql-jdbc

Does anyone know what the spec says if a parameter is registered and  
the underlying type is not the same as the registered type?

for instance registerOutParameter( n, Types.Real ) where the  
underlying type is float8

In general should we be attempting to convert to the case requested ?

The particular example above is required for the test to pass.

Dave


Dave Cramer
davec@postgresintl.com
www.postgresintl.com
ICQ #14675561
jabber davecramer@jabber.org
ph (519 939 0336 )




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: JDBCCTS issues
  2005-07-05 13:18 JDBCCTS issues Dave Cramer <pg@fastcrypt.com>
@ 2005-07-05 23:05 ` Oliver Jowett <oliver@opencloud.com>
  2005-07-06 02:30   ` Re: JDBCCTS issues Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Oliver Jowett @ 2005-07-05 23:05 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

Dave Cramer wrote:
> Does anyone know what the spec says if a parameter is registered and 
> the underlying type is not the same as the registered type?
> 
> for instance registerOutParameter( n, Types.Real ) where the  underlying
> type is float8
> 
> In general should we be attempting to convert to the case requested ?

Ok I stared at the spec a bit..

It seems like the type you specify when registering is the type you
intend to retrieve via a get...() method, and the spec seems to imply
that the driver should cast the parameter to that type.. but it's vague
as usual.

The datatype conversion tables appendix does not talk about datatype
conversion on CallableStatement.get...() at all (though it does talk
about conversion in ResultSet).

So I suppose we should probably accept it and do a cast to the
appropriate type on return.

Am I right in thinking that OUT parameter types aren't considered part
of a function's signature and don't contribute to overloading at all?

-O



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: JDBCCTS issues
  2005-07-05 13:18 JDBCCTS issues Dave Cramer <pg@fastcrypt.com>
  2005-07-05 23:05 ` Re: JDBCCTS issues Oliver Jowett <oliver@opencloud.com>
@ 2005-07-06 02:30   ` Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Cramer @ 2005-07-06 02:30 UTC (permalink / raw)
  To: Oliver Jowett <oliver@opencloud.com>; +Cc: pgsql-jdbc


On 5-Jul-05, at 7:05 PM, Oliver Jowett wrote:

> Dave Cramer wrote:
>
>> Does anyone know what the spec says if a parameter is registered and
>> the underlying type is not the same as the registered type?
>>
>> for instance registerOutParameter( n, Types.Real ) where the   
>> underlying
>> type is float8
>>
>> In general should we be attempting to convert to the case requested ?
>>
>
> Ok I stared at the spec a bit..
>
> It seems like the type you specify when registering is the type you
> intend to retrieve via a get...() method, and the spec seems to imply
> that the driver should cast the parameter to that type.. but it's  
> vague
> as usual.
>
> The datatype conversion tables appendix does not talk about datatype
> conversion on CallableStatement.get...() at all (though it does talk
> about conversion in ResultSet).
>
> So I suppose we should probably accept it and do a cast to the
> appropriate type on return.

I don't think anyone will mind if we make it easier for them.
>
> Am I right in thinking that OUT parameter types aren't considered part
> of a function's signature and don't contribute to overloading at all?
At the moment that is true, yes

>
> -O
>
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-07-06 02:30 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-09 01:31 jdbccts issues Dave Cramer <pg@fastcrypt.com>
2005-07-05 13:18 JDBCCTS issues Dave Cramer <pg@fastcrypt.com>
2005-07-05 23:05 ` Re: JDBCCTS issues Oliver Jowett <oliver@opencloud.com>
2005-07-06 02:30   ` Re: JDBCCTS issues Dave Cramer <pg@fastcrypt.com>

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