Re: User Defined Types in Java - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Re: User Defined Types in Java
Date
Msg-id 43EB52BC.3090800@tada.se
Whole thread Raw
In response to Re: User Defined Types in Java  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: User Defined Types in Java  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Thomas Hallgren <thomas@tada.se> writes:
>   
>> I'd like to enable UDT's written in Java
>>     
>
> Does Java really give you enough control over the bit-level
> representation of an object for this goal to be considered sane?
>
>   
Most definitely yes!

> In particular, it seems unsafe to use a Java class as a PG UDT,
> because the method pointers wouldn't remain the same across
> backend runs.
>
>   
I'm not sure I understand what you mean. I assume that all calls would 
come in through the java_call_handler. The java_call_handler will make 
sure that the correct class and method is called. How is that different 
from any other declared function? Or are you thinking of the lifecycle 
of the binary data versus the lifecycle of the methods that manipulate 
it? They might be different and that might cause problems. But that's 
true for a UDT defined in C as well.

Regards,
Thomas Hallgren



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: User Defined Types in Java
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_hba.conf alternative