public inbox for [email protected]
help / color / mirror / Atom feedSubject: [Pljava-dev] How to read LargeObject with pljava?
Date: Thu, 18 Jun 2009 13:52:14 -0400 (EDT)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Wed, 17 Jun 2009, Oleg Vasylenko wrote:
> Does org.postgresql.pljava.internal.LargeObject object and methods
> read/write/open/close still being experimental or methods have to work
> correctly in PLJava 1.4.0?
Looking at the source code, it doesn't work at all. With the attached
patch it mostly works. LargeObject.create still doesn't work and you will
get warnings about relcache reference leaks, but these are harmless and
can be ignored.
Kris Jurka
-------------- next part --------------
Index: src/C/pljava/type/LargeObject.c
===================================================================
RCS file: /cvsroot/pljava/org.postgresql.pljava/src/C/pljava/type/LargeObject.c,v
retrieving revision 1.14
diff -c -r1.14 LargeObject.c
*** src/C/pljava/type/LargeObject.c 28 May 2006 22:01:48 -0000 1.14
--- src/C/pljava/type/LargeObject.c 18 Jun 2009 17:07:49 -0000
***************
*** 23,38 ****
*/
jobject LargeObject_create(LargeObjectDesc* lo)
{
- jobject jlo;
- Ptr2Long loH;
-
if(lo == 0)
return 0;
! loH.longVal = 0L; /* ensure that the rest is zeroed out */
! loH.ptrVal = lo;
! jlo = JNI_newObject(s_LargeObject_class, s_LargeObject_init, loH.longVal);
! return jlo;
}
extern void LargeObject_initialize(void);
--- 23,32 ----
*/
jobject LargeObject_create(LargeObjectDesc* lo)
{
if(lo == 0)
return 0;
! return JNI_newObject(s_LargeObject_class, s_LargeObject_init, Invocation_createLocalWrapper(lo));
}
extern void LargeObject_initialize(void);
view thread (4+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Subject: Re: [Pljava-dev] How to read LargeObject with pljava?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox