I wrote:
> Accordingly, I borrowed some code from that thread and present
> the attached revision. I also added some test coverage, since
> that was lacking before, and wordsmithed docs and comments slightly.
Hearing no comments, pushed that way.
regards, tom lane