I'll dive into my bookmarks and see if I can find it.
Tom Lane wrote:
>"Jonah H. Harris" <jharris@tvi.edu> writes:
>
>
>>I'm familiar with the 2Q algorithm. I also remember seeing, I believe,
>>a public domain 2Q implementation floating around somewhere.
>>
>>
>
>No doubt, but I think the more conservative way to get there is to
>proceed by trimming down the working code we already have. Adapting
>someone else's code to fit into our backend infrastructure would involve
>a fair amount of modifications (memory management and error handling at
>the very least) with consequent risks of introducing bugs.
>
>Still, it wouldn't be bad to have someone else's implementation at hand
>as a comparison point. Do you have a link handy?
>
> regards, tom lane
>
>