From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, Scott Bailey <artacus(at)comcast(dot)net>, hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Range types |
Date: | 2009-12-16 21:37:43 |
Message-ID: | 13202.1260999463@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> However, it does seem reasonable to allow people to restrict, either by
> typmod or a check constraint the kinds of values that can be stored in
> a particular column. Then an application can decide which way they want
> their intervals to work and have the database enforce it.
Sure --- the range datatype should absolutely provide inquiry functions
that let you determine all the properties of a range, so something like
"CHECK (is_open_on_right(col))" would work for that. I'm of the opinion
that we must not usurp typmod for range behavior --- the right thing is
to pass that through to the contained type, just as we do with arrays.
(Note that a range over timestamp(0) would eliminate at least some of
the platform dependencies we've been arguing about. I'm still quite
dubious that "next timestamp" is anything except evidence that you've
misformulated your problem, though.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2009-12-16 22:14:40 | Re: Range types |
Previous Message | Jeff Davis | 2009-12-16 21:32:59 | Re: Range types |