> SELECT ... WHERE col ~ '(foo|bar)' works, but CHECK on table always fails
Does not reproduce here.
test=> create table t2 (i text check(i ~ '(foo|bar)'));
CREATE
test=> insert into t1 values ('aaa');
ERROR: ExecAppend: rejected due to CHECK constraint t1_i
test=> insert into t1 values ('foo');
INSERT 18634 1
---
Tatsuo Ishii