This looks like a live bug in pg_trgm to me. I can strip away much of the stuff and still reproduce it with this simple test case: create table foobar (x text); insert into foobar values ('eldrazi scion'),('eldrazi scio'); create extension pg_trgm ; create index on foobar using gin (x gin_trgm_ops); select * from foobar where x ~ 'eldrazi (?!scion)'; -- returns 1 row set enable_seqscan TO off; select * from foobar where x ~ 'eldrazi (?!scion)'; -- returns 0 rows Note that a similar bug was fixed recently (in yet-to-be-released code, commit 16500d2278ab3dd), but that fix does not fix this bug. I've reported this bug myself, as #14623