Re: diff-/patch-functionality for text-type data inside PostgreSQL

From: "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: diff-/patch-functionality for text-type data inside PostgreSQL
Date: 2009-05-04 13:43:57
Message-ID: 28011CD60FB1724DBA4442E38277F6260C9CA229@hermes.computec.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

> -----Ursprüngliche Nachricht-----
> Von: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Gesendet: Montag, 4. Mai 2009 15:04

> "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de> writes:
> > 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.
>
> Almost all diff/patch functions operate line-by-line, so that
> hardly seems surprising.

Not so much surprising, no, but I hadn't expected it to fail altogether on entries that just end after one line of text just because they lack a newline character - they are a one line text after all, so I assumed that the diff would produce a "replace this old line with the new one" type of instruction instead of producing something that patch doesn't seem to be able to process at all.

Kind regards

Markus

Computec Media AG
Sitz der Gesellschaft und Registergericht: Fürth (HRB 8818)
Vorstandsmitglieder: Albrecht Hengstenberg (Vorsitzender) und Rainer Rosenbusch
Vorsitzender des Aufsichtsrates: Jürg Marquard
Umsatzsteuer-Identifikationsnummer: DE 812 575 276

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Markus Wollny 2009-05-04 13:48:12 Re: diff-/patch-functionality for text-type data insidePostgreSQL
Previous Message Grzegorz Buś 2009-05-04 13:41:59 Re: could not bind IPv4 socket