Hi,

I need to store data that has a valid timespan with start and enddate.

objects ( id, name, ... )
object_data ( object_id referencs objects(id), startdate, enddate, ... )

nothing special, yet

How can I have PG reject a data record where the new start- or enddate lies between the start- or enddate of another record regarding the same object_id?

Also it isn't allowed that such timespans lie within another.

There can be times where no valid data exists but there can't be more than one valid data-record for the same point in time.



--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to