From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Subject: | Re: WIP: RangeTypes |
Date: | 2011-02-08 16:21:27 |
Message-ID: | 1297182087.27157.178.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Hitoshi Harada | 2011-02-08 16:25:22 | Re: Add ENCODING option to COPY |
Previous Message | Steve Singer | 2011-02-08 16:21:25 | Re: postponing some large patches to 9.2 |