Patch applied to jdbc1 and jdbc2. Thanks.
> Saw this on a EJB list I'm on...
>
> Does anyone know if this is in fact an error and if the driver needs to be
> updated?
>
> Hunter
>
> ------ Forwarded Message
> From: Christofer Sandberg <csadev@propacta.se>
> Reply-To: jboss-user@lists.sourceforge.net
> Date: 20 Apr 2001 00:00:01 +0200
> To: jboss-user@lists.sourceforge.net
> Subject: Re: [JBoss-user] CMP Postgres and Booleans
>
> I had this problem aswell, and i belive that the postgres
> JDBC2 driver is to blame.
>
> A quick fix to the problem is to edit the ResultSet.java file
> in the Postgres driver source.
>
> Change the line:
> return ((c == 't') || (c == 'T'));
> int the getBoolean function on line 184:ish to:
> return ((c == 't') || (c == 'T') (c == '1'));
>
>
> This solved the problem for me... thank god for OpenSource.
>
> </christofer>
>
> On 09 Apr 2001 12:00:14 -0700, Philip Craven wrote:
> > I have a CMP bean that has a boolean variable. Before
> > jboss is started, the value in the postgres database
> > is 1 (true), after I start postgres and the bean is
> > loaded, the value goes to false, and the database is
> > updated to reflect this. What do I have
> > misconfigured?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Index: src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java,v
retrieving revision 1.10
diff -c -r1.10 ResultSet.java
*** src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java 2001/05/16 16:20:53 1.10
--- src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java 2001/05/16 16:23:27
***************
*** 190,196 ****
if (s != null)
{
int c = s.charAt(0);
! return ((c == 't') || (c == 'T'));
}
return false; // SQL NULL
}
--- 190,196 ----
if (s != null)
{
int c = s.charAt(0);
! return ((c == 't') || (c == 'T') || (c == '1'));
}
return false; // SQL NULL
}
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.22
diff -c -r1.22 ResultSet.java
*** src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java 2001/02/16 16:45:00 1.22
--- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java 2001/05/16 16:23:27
***************
*** 198,204 ****
if (s != null)
{
int c = s.charAt(0);
! return ((c == 't') || (c == 'T'));
}
return false; // SQL NULL
}
--- 198,204 ----
if (s != null)
{
int c = s.charAt(0);
! return ((c == 't') || (c == 'T') || (c == '1'));
}
return false; // SQL NULL
}