admin管理员组

文章数量:1410712

I want to check if time is overlapping but I want only to check if time is overlapping when it is not cancelled so when cancelled is false.

How I do it ?

Here is my current code

ALTER TABLE meetings ADD CONSTRAINT no_overlapping_meetings EXCLUDE USING GIST (
        is_cancelled = FALSE, <- I want to make like this that only check when is_cancelled is false
        tsrange(start_time, end_time, '[)') WITH &&
    )

本文标签: postgresqlHow can I add exlude constraint where iscancelledfalseStack Overflow