Re: WIP: RangeTypes - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: WIP: RangeTypes
Date
Msg-id 1297182087.27157.178.camel@jdavis
Whole thread Raw
In response to Re: WIP: RangeTypes  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Steve Singer
Date:
Subject: Re: postponing some large patches to 9.2
Next
From: Dimitri Fontaine
Date:
Subject: Re: Extensions support for pg_dump, patch v27