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

From Tom Lane
Subject Re: User Defined Types in Java
Date
Msg-id 2084.1139848893@sss.pgh.pa.us
Whole thread Raw
In response to Re: User Defined Types in Java  (Thomas Hallgren <thomas@tada.se>)
Responses Re: User Defined Types in Java
List pgsql-hackers
Thomas Hallgren <thomas@tada.se> writes:
> Ok, so there are two 'optional' arguments. Following my suggestion, the 
> input and receive function would always take 3 arguments. Then, it's up 
> to the function as such if it makes use of them or not. Do you see any 
> problem with that?

(1) backwards compatibility
(2) inability to ever add a fourth optional argument without creating   a flag day for everyone

I'm all for cleaning up the handling of shell types (and in fact have
had that on my personal TODO list for ages).  But I see zero if not
negative usefulness in these ideas about changing CREATE TYPE.  The
certain outcome of that is to import all the complications of CREATE
FUNCTION into CREATE TYPE, and for what gain?

> So which is it?

> CREATE TYPE complex;
> CREATE TYPE complex AS SHELL;
> DECLARE TYPE complex;

I'd go with the first.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Mark Woodward"
Date:
Subject: Re: Why don't we allow DNS names in pg_hba.conf?
Next
From: Andrew Dunstan
Date:
Subject: Re: Why don't we allow DNS names in pg_hba.conf?