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

From Thomas Hallgren
Subject Re: User Defined Types in Java
Date
Msg-id 43EF7F7A.5090905@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
List pgsql-hackers
Tom Lane wrote:
> Thomas Hallgren <thomas@tada.se> writes:
>   
>> What do you think of my earlier suggestion. Skip all the 'create function' statements and 
>> just add the "AS 'filename' LANGUAGE C" to the CREATE TYPE.
>>     
>
> Very little, as it makes unjustifiable assumptions about all the
> datatype's support functions being predictably propertied.  (There's
> more than one possible signature, let alone any secondary properties
> such as volatility or other stuff we might think of in future.)
> I think it'd be unworkable from pg_dump's point of view, as well.
>
>   
I wasn't aware that there was more then one possible signature. What 
other signatures are possible (I have a working draft in PL/Java now and 
I don't want to miss anything)?

Just a thought, but future properties like volatility should perhaps be 
annotations on the type rather than on its functions?

I guess the pg_dump problem that you're thinking of is that there's no 
way to associate the functions with the type that they would belong to. 
Perhaps this could be done by adding a 'protype oid' column to the 
pg_proc table? Introducing that would probably help introducing SQL 2003 
semantics further on (I'm thinking of methods that belongs to types. Not 
very different from a function taking the type as it's first argument).

In any case; at present I use a dummy function to circumvent the Java 
function shell type problem. What was the outcome of the shell type 
discussion? Will a 'CREATE TYPE xxx AS SHELL' or similar be considered 
for 8.2?

Kind Regards,
Thomas Hallgren



pgsql-hackers by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: Analyze and vacuum, they are sort of mandatory....
Next
From: Martijn van Oosterhout
Date:
Subject: Re: User Defined Types in Java