Postgresql – How to avoid circular relations in postgres using cycle detection
I'm trying to use CYCLE detection in PostgreSQL to avoid circular nesting of groups but cannot figure it out. I have the following PostgreSQL 16 table: CREATE TABLE groups ( id serial PRIMARY KEY, name text NOT NULL ); INSERT…