Skip site navigation (1) Skip section navigation (2)

Re: pg_dump formatting

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-admin(at)postgresql(dot)org, Caleb Cushing <xenoterracide(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: pg_dump formatting
Date: 2009-03-22 17:09:36
Message-ID: 14030.1237741776@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
I wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Maybe wdiff will do what you want.

> I don't think we'd consider making the kind of changes to the COPY
> specification that would be needed to allow this sort of thing in COPY
> mode.  However, it'd be pretty trivial to put \n instead of space
> between fields in the INSERT dump formats.  I wonder whether that would
> answer the need ...

On further reflection I think Peter's suggestion is better.  It's not
hard to think of cases where a data-value-per-line format is *less*
useful not more so for diff-ing, because you lose all sense that a
table row is one logical unit.  What the OP seems to be concerned about
is insertion/modification/deletion of words within fairly long data
fields.  wdiff is ideal for that problem, while simply breaking at field
boundaries wouldn't help all that much.

			regards, tom lane

In response to

pgsql-admin by date

Next:From: DMDate: 2009-03-23 05:44:28
Subject: pg_restore error - Any Idea?
Previous:From: Tom LaneDate: 2009-03-22 14:44:00
Subject: Re: pg_dump formatting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group