pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC - Numeric & Decimal handling in 6.5.3?
4+ messages / 2 participants
[nested] [flat]

* JDBC - Numeric & Decimal handling in 6.5.3?
@ 2000-02-19 19:25  Dave Del Signore <dave@narnia.toledo.oh.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Del Signore @ 2000-02-19 19:25 UTC (permalink / raw)
  To: pgsql-interfaces

Hi,

I've noticed that the numeric/decimal handling in the stock 6.5.3 driver
is still not functional.  Is work in progress on this one?  I think I've
been able to patch the driver up to support these types.    In addition,
I've fixed some other unimplemented functions.  I also moved a few
functions from the ResultSetMetaData class to the Field class, as it
seemed the more appropriate place for them, and so that I might cache
some of the field's properties instead of doing lookups each time.

This is the first time I've ever posted a patch to a major project.
Please forgive me (and let me know) if I've committed any breaches of
etiquette, or done anything else improperly.

 The patch is available at:

    http://www.narnia.toledo.oh.us/downloads/jdbc.patch.gz.

The patch should be applied from the interfaces/jdbc directory.

Here's a list of the things I've done:

postgresql.jdbc[12].DatabaseMetaData.getColumns()
    fixed Numeric Size and Decimal Digits handling

postgresql.jdbc[12].ResultSetMetaData.isCaseSensitive()
    added handling to return appropriate values for numeric & decimal
types.
postgresql.jdbc[12].ResultSetMetaData.isSigned()
    added handling to return appropriate values for numeric & decimal
types.
postgresql.jdbc[12].ResultSetMetaData.getPrecision()
    now returns postgresql.Field.getPrecision()
postgresql.jdbc[12].ResultSetMetaData.getScale()
    now returns postgresql.Field.getScale()
postgresql.jdbc[12].ResultSetMetaData.getTableName()
    now returns postgresql.Field.getTableName()

postgresql.jdbc2.ResultSet.next()
    sets this_row to null when we've moved past the last row
postgresql.jdbc2.ResultSet.afterLast()
    sets this_row to null and current_row to 1 past the last row's index

postgresql.jdbc2.ResultSet.getBigDecimal(int column)
    returns the appropriate value.  Currently does not force the scale
to the value
    specified by the row's metadata.
postgresql.jdbc2.ResultSet.getBigDecimal(String columnName)
    returns postgresql.jdbc2.ResultSet.getBigDecimal(int column)
postgresql.jdbc2.ResultSet.isBeforeFirst()
postgresql.jdbc2.ResultSet.isFirst()
postgresql.jdbc2.ResultSet.isLast()
postgresql.jdbc2.ResultSet.isAfterLast()
    returns the appropriate value, by comparing current_row to the size
of the row array

postgresql.Field.types[]
    added numeric and decimal
postgresql.Field.typei[]
    added java.sql.Types.NUMERIC and DECIMAL
postgresql.Field.typei[]
postgresql.Field.getDetails()
    method to determine whether we've got the ResultSet's metadata
cached, and get it if not.
postgresql.Field.cacheDetails()
    method to query the field's metadata and cache the results
postgresql.Field.getTableName()
    returns the field's table name.
postgresql.Field.getAtttypmod()
    return the field's (postgresql) atttypmod property
postgresql.Field.getScale()
    from ResultSetMetaData: return the field's scale, with handling for
numerics & decimals
postgresql.Field.getPrecision()
    from ResultSetMetaData: return the field's precision, with handling
for numerics & decimals

postgresql.ResultSet.getInt()
    abstract class to allow compilation























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

* Re: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3?
@ 2000-02-19 21:48  Dave Del Signore <dave@narnia.toledo.oh.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Del Signore @ 2000-02-19 21:48 UTC (permalink / raw)
  To: pgsql-interfaces

Jens (et. al.),

Thanks for your tip.  How does one go about contributing patches?  I've
installed CVSup and I am synchronizing now.  I assume that I should
create my patches in a separate subdirectory, but how do I submit them?
Is there a standard format for such things?  Is Peter still the contact
for
submitting JDBC patches?

Sorry for the neophytic questions.  Thank you in advance for your help.

Regards,

Dave Del Signore
dave@narnia.toledo.oh.us

Jens Glaser wrote:

> Hi,
>
> On Sat, 19 Feb 2000, Dave Del Signore wrote:
> > I've noticed that the numeric/decimal handling in the stock 6.5.3
driver
> > is still not functional.  Is work in progress on this one?  I think
I've
>
> it is fixed in the version in the CVS. But I think your MetaData
methods
> would still be an improvement.
>
> --
> Jens Glaser   Phil.-Rosenth.-Str. 31-438    04103 Leipzig   (0341)
2157167




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

* RE: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3?
@ 2000-02-22 07:48  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Mount @ 2000-02-22 07:48 UTC (permalink / raw)
  To: 'Dave Del Signore' <dave@narnia.toledo.oh.us>; pgsql-interfaces

Yes, I'm still the best contact, although my work load is unusually high
at the moment :-(

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.



-----Original Message-----
From: Dave Del Signore [mailto:dave@narnia.toledo.oh.us]
Sent: Saturday, February 19, 2000 9:49 PM
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3?


Jens (et. al.),

Thanks for your tip.  How does one go about contributing patches?  I've
installed CVSup and I am synchronizing now.  I assume that I should
create my patches in a separate subdirectory, but how do I submit them?
Is there a standard format for such things?  Is Peter still the contact
for
submitting JDBC patches?

Sorry for the neophytic questions.  Thank you in advance for your help.

Regards,

Dave Del Signore
dave@narnia.toledo.oh.us

Jens Glaser wrote:

> Hi,
>
> On Sat, 19 Feb 2000, Dave Del Signore wrote:
> > I've noticed that the numeric/decimal handling in the stock 6.5.3
driver
> > is still not functional.  Is work in progress on this one?  I think
I've
>
> it is fixed in the version in the CVS. But I think your MetaData
methods
> would still be an improvement.
>
> --
> Jens Glaser   Phil.-Rosenth.-Str. 31-438    04103 Leipzig   (0341)
2157167


************



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

* RE: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3?
@ 2000-02-22 07:49  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Mount @ 2000-02-22 07:49 UTC (permalink / raw)
  To: 'Dave Del Signore' <dave@narnia.toledo.oh.us>; pgsql-interfaces

The 6.5.3 driver is infact the 6.5.2 driver, due to a problem I had with
CVS at the time :-(

Peter

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.



-----Original Message-----
From: Dave Del Signore [mailto:dave@narnia.toledo.oh.us]
Sent: Saturday, February 19, 2000 7:25 PM
To: pgsql-interfaces@postgresql.org
Subject: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3?


Hi,

I've noticed that the numeric/decimal handling in the stock 6.5.3 driver
is still not functional.  Is work in progress on this one?  I think I've
been able to patch the driver up to support these types.    In addition,
I've fixed some other unimplemented functions.  I also moved a few
functions from the ResultSetMetaData class to the Field class, as it
seemed the more appropriate place for them, and so that I might cache
some of the field's properties instead of doing lookups each time.

This is the first time I've ever posted a patch to a major project.
Please forgive me (and let me know) if I've committed any breaches of
etiquette, or done anything else improperly.

 The patch is available at:

    http://www.narnia.toledo.oh.us/downloads/jdbc.patch.gz.

The patch should be applied from the interfaces/jdbc directory.

Here's a list of the things I've done:

postgresql.jdbc[12].DatabaseMetaData.getColumns()
    fixed Numeric Size and Decimal Digits handling

postgresql.jdbc[12].ResultSetMetaData.isCaseSensitive()
    added handling to return appropriate values for numeric & decimal
types.
postgresql.jdbc[12].ResultSetMetaData.isSigned()
    added handling to return appropriate values for numeric & decimal
types.
postgresql.jdbc[12].ResultSetMetaData.getPrecision()
    now returns postgresql.Field.getPrecision()
postgresql.jdbc[12].ResultSetMetaData.getScale()
    now returns postgresql.Field.getScale()
postgresql.jdbc[12].ResultSetMetaData.getTableName()
    now returns postgresql.Field.getTableName()

postgresql.jdbc2.ResultSet.next()
    sets this_row to null when we've moved past the last row
postgresql.jdbc2.ResultSet.afterLast()
    sets this_row to null and current_row to 1 past the last row's index

postgresql.jdbc2.ResultSet.getBigDecimal(int column)
    returns the appropriate value.  Currently does not force the scale
to the value
    specified by the row's metadata.
postgresql.jdbc2.ResultSet.getBigDecimal(String columnName)
    returns postgresql.jdbc2.ResultSet.getBigDecimal(int column)
postgresql.jdbc2.ResultSet.isBeforeFirst()
postgresql.jdbc2.ResultSet.isFirst()
postgresql.jdbc2.ResultSet.isLast()
postgresql.jdbc2.ResultSet.isAfterLast()
    returns the appropriate value, by comparing current_row to the size
of the row array

postgresql.Field.types[]
    added numeric and decimal
postgresql.Field.typei[]
    added java.sql.Types.NUMERIC and DECIMAL
postgresql.Field.typei[]
postgresql.Field.getDetails()
    method to determine whether we've got the ResultSet's metadata
cached, and get it if not.
postgresql.Field.cacheDetails()
    method to query the field's metadata and cache the results
postgresql.Field.getTableName()
    returns the field's table name.
postgresql.Field.getAtttypmod()
    return the field's (postgresql) atttypmod property
postgresql.Field.getScale()
    from ResultSetMetaData: return the field's scale, with handling for
numerics & decimals
postgresql.Field.getPrecision()
    from ResultSetMetaData: return the field's precision, with handling
for numerics & decimals

postgresql.ResultSet.getInt()
    abstract class to allow compilation





















************



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


end of thread, other threads:[~2000-02-22 07:49 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-02-19 19:25 JDBC - Numeric & Decimal handling in 6.5.3? Dave Del Signore <dave@narnia.toledo.oh.us>
2000-02-19 21:48 Re: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3? Dave Del Signore <dave@narnia.toledo.oh.us>
2000-02-22 07:48 RE: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3? Peter Mount <petermount@it.maidstone.gov.uk>
2000-02-22 07:49 RE: [INTERFACES] JDBC - Numeric & Decimal handling in 6.5.3? Peter Mount <petermount@it.maidstone.gov.uk>

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