Skip site navigation (1) Skip section navigation (2)

Re: Using boolean '1' in jdbc2

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Barry Lind <barry(at)xythos(dot)com>
Cc: PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Using boolean '1' in jdbc2
Date: 2001-09-14 17:41:15
Message-ID: 200109141741.f8EHfGU27947@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
OK, patch applied.

> Bruce,
> 
> This patch is fine.
> 
> thanks,
> --Barry
> 
> 
> Bruce Momjian wrote:
> > I noticed that jdbc1 getBoolean allows '1', while jdbc2 does not.  The
> > following patch makes jdbc2 accept '1' also.  Is this OK?
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > Index: src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
> > ===================================================================
> > RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java,v
> > retrieving revision 1.33
> > diff -c -r1.33 ResultSet.java
> > *** src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java	2001/09/10 15:07:05	1.33
> > --- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java	2001/09/13 16:43:51
> > ***************
> > *** 1396,1402 ****
> >   		if (s != null)
> >   		{
> >   			int c = s.charAt(0);
> > ! 			return ((c == 't') || (c == 'T'));
> >   		}
> >   		return false;		// SQL NULL
> >   	}
> > --- 1396,1402 ----
> >   		if (s != null)
> >   		{
> >   			int c = s.charAt(0);
> > ! 			return ((c == 't') || (c == 'T') || (c == '1'));
> >   		}
> >   		return false;		// SQL NULL
> >   	}
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> > 
> > http://www.postgresql.org/users-lounge/docs/faq.html
> > 
> > /bjm/diff
> > 
> > Content-Type:
> > 
> > text/plain
> > Content-Encoding:
> > 
> > 7bit
> > 
> > 
> > ------------------------------------------------------------------------
> > Part 1.3
> > 
> > Content-Type:
> > 
> > text/plain
> > Content-Encoding:
> > 
> > binary
> > 
> > 
> 
> 
> 

-- 
  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

In response to

pgsql-jdbc by date

Next:From: Bruce MomjianDate: 2001-09-15 00:16:19
Subject: Re: Patch for Statement Escape Processing problems
Previous:From: Tomisław KityńskiDate: 2001-09-14 15:53:50
Subject: isNullable()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group