On Mon, 2011-02-07 at 20:32 +0200, Peter Eisentraut wrote:
> Have you considered a grammar approach like for arrays, so that you
> would write something like
>
> CREATE TABLE ... (
> foo RANGE OF int
> );
>
> instead of explicitly creating a range type for every scalar type in
> existence? I think that that might be easier to use in the common case.
It would be nice, but the type system just isn't powerful enough to
express things like that right now, as far as I can tell.
That works for arrays because every type in PG has a second pg_type
entry for the array type. I don't think we want to do something similar
for range types -- especially if there are alternative range types for a
given base type.
Regards,Jeff Davis