By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
2 rows affected
1 rows affected
ERROR: conflicting key value violates exclusion constraint "tsr_no_overlap"
DETAIL: Key (tsr)=(["2013-10-22 00:00:00","2013-10-22 04:00:00")) conflicts with existing key (tsr)=(["2013-10-22 00:00:00","2013-10-22 01:00:00")).
ERROR: conflicting key value violates exclusion constraint "tsr_no_adjacent"
DETAIL: Key (tsr)=(["2013-10-22 03:00:00","2013-10-22 04:00:00")) conflicts with existing key (tsr)=(["2013-10-22 02:00:00","2013-10-22 03:00:00")).
ERROR: conflicting key value violates exclusion constraint "tsr_no_overlap"
DETAIL: Key (tsr)=(["2013-10-22 02:30:00","2013-10-22 04:00:00")) conflicts with existing key (tsr)=(["2013-10-22 02:00:00","2013-10-22 03:00:00")).
ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
ERROR: ON CONFLICT DO UPDATE not supported with exclusion constraints
tbl_id | tsr |
---|---|
1 | ["2013-10-22 00:00:00","2013-10-22 01:00:00") |
2 | ["2013-10-22 02:00:00","2013-10-22 03:00:00") |
3 | ["2013-10-22 06:00:00","2013-10-22 07:00:00") |