On Mon, May 04, 2009 at 12:26:13PM +0200, Markus Wollny wrote:
> So far I have been playing around with PL/PerlU for diff/path
> functionality, using CPAN modules Text::Diff and Text::Patch, but
> haven't been too successful, as there seems to be some issue with this
> mechanism if the text data doesn't contain newlines. Just as an
> off-topic info, because it's some issue with the CPAN modules, not with
> PostgreSQL:

I've used the Algorithm::Diff module in the past with success. It works
on sequences of objects rather than just text but it works well. That
means you can diff on word or character level at your choice, and even
control what sequences you consider "equal". That said, it doesn't have
a patch function but that should be fairly easy to make. You'll need to
define your own storage format for the diff though.

http://search.cpan.org/~nedkonz/Algorithm-Diff-1.15/lib/Algorithm/Diff.pm

Have a nice day,
-- 
Martijn van Oosterhout   <klep...@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature

Reply via email to