On Sun, Feb 12, 2006 at 07:33:30PM +0100, Thomas Hallgren wrote:
> >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)?

The docs are your friend, see[1] in particular the input_function and
the receive_function.

[1] http://www.postgresql.org/docs/8.1/interactive/sql-createtype.html

> 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).

I think the pg_dump is the fact that pg_dump needs to produce output
that can be parsed to recreate the type and your suggestion only covers
a very small set of possible type definitions (all in same lib,
external func name = postgres func name, etc).

> 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?

Hopefully something will be considered, but the first person who
produces a patch will probably get priority :)

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: signature.asc
Description: Digital signature

Reply via email to