Re: extended operator classes vs. type interfaces - Mailing list pgsql-hackers

From Robert Haas
Subject Re: extended operator classes vs. type interfaces
Date
Msg-id j2l603c8f071004091019u59862408oa6076eec1e516c75@mail.gmail.com
Whole thread Raw
In response to Re: extended operator classes vs. type interfaces  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: extended operator classes vs. type interfaces  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
On Fri, Apr 9, 2010 at 1:13 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> As it is de rigueur for someone to escalate the proposed complexity
> of an idea by at least one order of magnitude, and everyone else has
> fallen down on this one:  ;-)

Gee, thanks for filling in?

> I've often thought that if we rework the type system, it would be
> very nice to support a concept of hierarchy.  If you could
> "subclass" money to have a subclass like assessable, which in turn
> has subclasses of fine, fee, restitution, etc. you could then
> automatically do anything with a subclass which you could do with
> the superclass, and support such things as treating the sum of
> various classes as the lowest common subclass.  It seems like this
> sort of approach, if done right, might allow some easier way to
> establish sensible operations between types (like distance / speed =
> time or speed * time = distance).
>
> Just a thought....

I dowanna rework the type system.  I'm not even 100% sure I want to
implement what I actually proposed.  I do want to find out if people
think the framework makes sense and whether it's the right way forward
for those projects that need these features.  What you're proposing
here sounds suspiciously like something that should be handled by
creating domains - but in any case it's almost entirely unrelated to
what I was talking about.

...Robert


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: extended operator classes vs. type interfaces
Next
From: "Kevin Grittner"
Date:
Subject: Re: is_absolute_path incorrect on Windows