Re: Another patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Dave Cramer <Dave(at)micro-automation(dot)net>
Cc: PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Another patch
Date: 2001-05-16 17:21:31
Message-ID: 200105161721.f4GHLWu18533@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Patch applied and attached. Thanks.

[ Charset ISO-8859-1 unsupported, converting... ]
> *** PreparedStatement.java.orig Wed May 9 07:17:37 2001
> --- PreparedStatement.java Sat Apr 21 13:23:03 2001
> ***************
> *** 515,520 ****
> --- 515,524 ----
> */
> public void setObject(int parameterIndex, Object x, int
> targetSqlType, int scale) throws SQLException
> {
> + if (null == x){
> + setNull(parameterIndex,Types.OTHER);
> + return;
> + }
> switch (targetSqlType)
> {
> case Types.TINYINT:
> ***************
> *** 566,571 ****
> --- 570,579 ----
> */
> public void setObject(int parameterIndex, Object x) throws
> SQLException
> {
> + if (null == x){
> + setNull(parameterIndex,Types.OTHER);
> + return;
> + }
> if (x instanceof String)
> setString(parameterIndex, (String)x);
> else if (x instanceof BigDecimal)
>
> ----- Original Message -----
> From: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
> To: "Dave Cramer" <Dave(at)micro-automation(dot)net>
> Sent: Wednesday, May 09, 2001 10:17 AM
> Subject: Re: [JDBC] Another patch
>
>
> >
> > Sorry, sure. diff -c.
> >
> >
> > [ Charset ISO-8859-1 unsupported, converting... ]
> > > Bruce,
> > >
> > > Sure, can you tell me how?
> > >
> > > --dc--
> > > ----- Original Message -----
> > > From: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
> > > To: "Dave Cramer" <Dave(at)micro-automation(dot)net>
> > > Sent: Wednesday, May 09, 2001 9:37 AM
> > > Subject: Re: [JDBC] Another patch
> > >
> > >
> > > >
> > > > Can you send a context diff? Thanks.
> > > >
> > > > [ Charset ISO-8859-1 unsupported, converting... ]
> > > > > Hopefully we can slip this in before 7.1.1
> > > > >
> > > > > This patch fixes a bug which occurs when setObject(1,obj) is called
> and
> > > obj
> > > > > is of type Object, and is null
> > > > >
> > > > > Regards,
> > > > >
> > > > > Dave
> > > > >
> > > > > [root(at)ebox2 jdbc2]# diff PreparedStatement.java.orig
> > > PreparedStatement.java
> > > > > 517a518,521
> > > > > > if (null == x){
> > > > > > setNull(parameterIndex,Types.OTHER);
> > > > > > return;
> > > > > > }
> > > > > 568a573,576
> > > > > > if (null == x){
> > > > > > setNull(parameterIndex,Types.OTHER);
> > > > > > return;
> > > > > > }
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------(end of
> broadcast)---------------------------
> > > > > TIP 5: Have you checked our extensive FAQ?
> > > > >
> > > > > http://www.postgresql.org/users-lounge/docs/faq.html
> > > > >
> > > >
> > > > --
> > > > Bruce Momjian | http://candle.pha.pa.us
> > > > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > > > + If your life is a hard drive, | 830 Blythe Avenue
> > > > + Christ can be your backup. | Drexel Hill, Pennsylvania
> 19026
> > > >
> > > >
> > >
> > >
> >
> > --
> > Bruce Momjian | http://candle.pha.pa.us
> > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > + If your life is a hard drive, | 830 Blythe Avenue
> > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
> >
> >
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 2.2 KB

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark D. Apolinski 2001-05-16 17:41:07 Help: Postgresql/JDBC database access error
Previous Message Bruce Momjian 2001-05-16 17:08:08 Re: getScale() and getPrecision() patch