Re: User Defined Types in Java

From: Thomas Hallgren <thomas(at)tada(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: User Defined Types in Java
Date: 2006-02-12 18:33:30
Message-ID: 43EF7F7A.5090905@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Thomas Hallgren <thomas(at)tada(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-02-12 19:03:01 Re: User Defined Types in Java
Previous Message Sergey E. Koposov 2006-02-12 17:34:26 Re: patch fixing the old RETURN NEXT bug