I have a property sheet (ID int,SourceID int,TargetID int,TargetType int)
ID SourceID TargetID< br />———————
1 123 456
2 456 789
3 1 123
4 456 1
5 2 1
I want to find all circular references. I want to write a PL/pgsql function for this.
here ID 4 = 456 1 123 456 circular reference