Tom Lane wrote:
Martijn van Oosterhout <klep...@svana.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
Well our work is based on over 15 years of temporal research (not by us)
and numerous books from Snodgrass, Date and Celko; as well as partial
implementations in other databases. So its not like we took a blue pill
this weekend and woke up with this hair-brained idea.
I understand your concern. But I think the objections are based more on
implementation details with float timestamp rather than conceptually.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers