Thomas Hallgren <thomas(at)tada(dot)se> writes:
> Tom Lane wrote:
>> 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.
Doesn't a Java object contain a method-table pointer that is used at
runtime to dispatch method calls on the object? If the object is dumped
bitwise into a PG table, and then reloaded into another backend session
(which maybe has loaded Java at different addresses), that pointer will
be invalid.
regards, tom lane