For prior discussion see forum...
I've only actually implemented a narrow set of cases, but they seem to suit my current needs.
Much of this is "code by analogy" from RDBMS support, so I may not understand the implications of some bits of it...other bits were left in because they *looked* right, and seemed useful here if they were useful elsewhere...but I haven't tested them thoroughly.
Is there a comprehensive test suite I can run against or should be augmenting?
Let me know if you need more.