Re: NULL Blob column error - PATCH FIX

Поиск
Список
Период
Сортировка
От David Wall
Тема Re: NULL Blob column error - PATCH FIX
Дата
Msg-id 000601c258f5$c8e86360$3201a8c0@expertrade.com
обсуждение исходный текст
Ответ на NULL Blob column error  ("David Wall" <d.wall@computer.org>)
Список pgsql-jdbc
Originally I thought this was going to be worse than I thought since I'm not
familiar with the fastpath code at all. However, a check of ResultSet.java
shows that the null check simply was not being done for getBlob().
Therefore, this patch for 7.2.2 will resolve the "FastPath call returned
ERROR:  inv_open: large object 0 not found" exception when retrieving
Blob/OID that is NULL.  I noted that this bug remains in the latest CVS as
well.

[postgresql@dev1 jdbc2]$ diff -c ResultSet.orig ResultSet.java
*** ResultSet.orig      Sat Jan  5 14:26:22 2002
--- ResultSet.java      Tue Sep 10 11:03:11 2002
***************
*** 931,936 ****
--- 931,940 ----

        public Blob getBlob(int i) throws SQLException
        {
+               wasNullFlag = (this_row[i - 1] == null);
+               if (wasNullFlag)
+                       return null;
+
                return new org.postgresql.largeobject.PGblob(connection,
getInt(i));
        }


David


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] problem with new autocommit config parameter and
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] problem with new autocommit config parameter and jdbc