Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> Something like the attached seems like it'd do the job.
> But, yeah, realistically, the hard part is proper testing and
> validation, which I lack the ability to do myself.
OK, let me play with this for awhile ...
regards, tom lane