On Fri, 2009-10-30 at 17:39 -0400, Robert Haas wrote:
> IMO, the real problem is that the type interface is poorly
> encapsulated. There's way too much code that knows about the internal
> details of a type - namely, that it's a 32-bit integer modified by a
> second 32-bit integer. I think there are still places where the code
> doesn't even know about typmod. If we're going to go to the trouble
> of changing anything, I think it should probably involve inserting an
> abstraction layer that will make future extensions easier. But I have
> a feeling that's going to be a tough sell.
Yeah. We're way off topic for partitioning, so I think it's best to just
table this discussion until someone comes up with a good idea.
It's not the end of the world to write some generic C code, and have
multiple types make use of it, e.g. PERIOD, PERIODTZ, INT4RANGE,
FLOAT8RANGE, etc. It's a little redundant and creates some catalog
bloat, but I'm not too concerned about it right now. Certainly not
enough to rewrite the type system.
Regards,Jeff Davis