
Untitled
By: a guest on
May 1st, 2012 | syntax:
SQL | size: 0.31 KB | hits: 13 | expires: Never
CHECK ( from_ts < to_ts ),
CONSTRAINT overlapping_times EXCLUDE USING GIST (
box(
point( EXTRACT(epoch FROM from_ts at TIME zone 'UTC'), EXTRACT(epoch FROM from_ts at TIME zone 'UTC') ),
point( EXTRACT(epoch FROM to_ts at TIME zone 'UTC') , EXTRACT(epoch FROM to_ts at TIME zone 'UTC') )
) WITH &&
)