Here's an updated version of this patch that is rebased against HEAD
(no changes there except line numbers) and adds the necessary updates
for contrib.
I'd like to get this committed fairly soon before it bit-rots.
Anyone want to review it?
regards, tom lane