Re: Longvarbinary - Mailing list pgsql-jdbc

From Amit Gollapudi
Subject Re: Longvarbinary
Date
Msg-id 3EAD42C9.50003@demandsolutions.com
Whole thread Raw
In response to Longvarbinary  (Amit Gollapudi <agollapudi@demandsolutions.com>)
Responses Re: Longvarbinary
List pgsql-jdbc
Since I have not heard back from anyone about this problem, I'm
including the tiny patch that fixed the problem for us.  Can someone
with commit rights to the code verify and commit the patch?  Please note
that the patch was created against the source for 7.3.2.

Thank you,
Amit Gollapudi
Demand Management, Inc.

Amit Gollapudi wrote:

>We ran across this problem a couple of weeks ago.  Calling setObject
>with a "longvarbinary" type on a statement was causing an "Unknown Types
>value." SQLException.  Is there any reason why the case statements at
>AbstractJdbc1Statement:1385 should not include Types.LONGVARBINARY?  I'm
>fairly new to this codebase - so, it's possible I overlooked something
>obvious.
>
>Thank you,
>Amit Gollapudi
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/docs/faqs/FAQ.html
>
>

--- AbstractJdbc1Statement.java 2002-11-20 01:54:27.000000000 -0600
+++ /home/gollapudi/tmp/AbstractJdbc1Statement.java     2003-04-24 15:21:17.000000000 -0500
@@ -1383,6 +1383,7 @@
                                break;
                        case Types.BINARY:
                        case Types.VARBINARY:
+                       case Types.LONGVARBINARY:
                                setObject(parameterIndex, x);
                                break;
                        case Types.OTHER:
@@ -1433,7 +1434,7 @@
                                l_sqlType = Types.TIMESTAMP;
                        else if (x instanceof Boolean)
                                l_sqlType = Types.OTHER;
-                       else
+                       else
                                l_sqlType = Types.OTHER;

                        setNull(parameterIndex, l_sqlType);


pgsql-jdbc by date:

Previous
From: Diego Gil
Date:
Subject: Re: setting postgres for java
Next
From: J M Okomba
Date:
Subject: Re: "Invalid character data was found"