agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] LargeObject
3+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] LargeObject
@ 2005-06-20 05:13  
  0 siblings, 2 replies; 3+ messages in thread

From:  @ 2005-06-20 05:13 UTC (permalink / raw)

Hello,

I tried to use LargeObject from pljava.
Do you have some sample code? I cannnot find it.

- pljava-1.1.0
- psql (PostgreSQL) 7.4.7
- java version "1.4.2_04"
- Fedora Core 2

--- I tried. ---
  import org.postgresql.pljava.internal.LargeObject;
  import org.postgresql.pljava.internal.Oid;
  
  
  Oid oid = (Oid)rs.getObject(1);
  Logger.getAnonymousLogger().info("oid.hashCode() : " + oid.hashCode());
  LargeObject largeObj = LargeObject.open(oid, LargeObject.INV_READ);
  largeObj.close();

--- result. ----
INFO:  20 6 05 13:42:21 test.LargeObjectTest oid.hashCode() : 19688167
ERROR:  java.lang.UnsatisfiedLinkError: _open



Thanks

Shunsuke




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] LargeObject
@ 2005-06-20 07:06  
  parent: 
  1 sibling, 0 replies; 3+ messages in thread

From:  @ 2005-06-20 07:06 UTC (permalink / raw)

Shunsuke,
The LargeObject support in PL/Java is experimental and in the current 
version, the C-code will not be initialized (hence the error that you 
get). The code is there though, and if you want to play around with it, 
my guess is that the only thing you need to do in order to get it to 
work is to add the line:

    LargeObject_initialize(fcinfo);

somewhere near the end of function Type_initialize in the file 
pljava/type/Type.c, recompile and try again.

Regards,
Thomas Hallgren


Shunsuke Ikegami wrote:

>Hello,
>
>I tried to use LargeObject from pljava.
>Do you have some sample code? I cannnot find it.
>
>- pljava-1.1.0
>- psql (PostgreSQL) 7.4.7
>- java version "1.4.2_04"
>- Fedora Core 2
>
>--- I tried. ---
>  import org.postgresql.pljava.internal.LargeObject;
>  import org.postgresql.pljava.internal.Oid;
>  
>  
>  Oid oid = (Oid)rs.getObject(1);
>  Logger.getAnonymousLogger().info("oid.hashCode() : " + oid.hashCode());
>  LargeObject largeObj = LargeObject.open(oid, LargeObject.INV_READ);
>  largeObj.close();
>
>--- result. ----
>INFO:  20 6 05 13:42:21 test.LargeObjectTest oid.hashCode() : 19688167
>ERROR:  java.lang.UnsatisfiedLinkError: _open
>
>
>
>Thanks
>
>Shunsuke
>_______________________________________________
>Pljava-dev mailing list
>Pljava-dev at gborg.postgresql.org
>http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>  
>






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [Pljava-dev] LargeObject
@ 2005-06-20 09:00  
  parent: 
  1 sibling, 0 replies; 3+ messages in thread

From:  @ 2005-06-20 09:00 UTC (permalink / raw)

Thomas.
Thank you!!!!!

java.lang.UnsatisfiedLinkError problem solved!
Your comment is very good.

I can get largeObj.length().
And I will try some methods of LargeObject. 


Thomas Hallgren wrote:
>
>    LargeObject_initialize(fcinfo);
>
>somewhere near the end of function Type_initialize in the file 
>pljava/type/Type.c, recompile and try again.
>


Thanks

Shunsuke




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-06-20 09:00 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-20 05:13 [Pljava-dev] LargeObject 
2005-06-20 07:06 ` 
2005-06-20 09:00 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox