add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
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?.
5 rows affected
ERROR:  new row for relation "route" violates check constraint "routes_orig_dest_distinct_ck"
DETAIL:  Failing row contains (6, Z, Z).

route_id origin destination
1 A B
2 C D
3 B A
4 C A
5 D C
point_1 point_2 count
A B 2
A C 1
C D 2
point_1 point_2 count
A B 2
A C 1
C D 2