Closed ddebernardy closed 13 years ago
OK, what it looks like to me is that you are creating empty periods. For instance, try:
select period('2009-01-01', '2009-01-01');
An empty period doesn't overlap with anything, so you can have as many of those as you want. When you add a second to only the end value, then it becomes a non-empty period, and therefore can overlap with other periods (and conflict).
Please do some experimentation and confirm that this matches your use case and expectations.
Confirming it's working as expected then. I've been playing with it most of yesterday afternoon.
To my great delight, too, as I was really scratching my head on how to store the non-live rows. :-)
I get the second one, which generates an error.
The first took me by surprise. (In a good way, too, but I'd like to make sure it's the expected behavior before I rely on it.)