Here's a v6 that's rebased up to HEAD and contains fixes for thesemantic issues we discussed. It still lacks documentation, butotherwise I think it's about ready to go.
regards, tom lane