SET LOCAL, Stay GLOBAL - A PostgreSQL Cautionary Tale

A hidden quirk in PostgreSQL's SET LOCAL command and how it unexpectedly affected our Row Level Security policy.