Re: pg_dump: PATCH for Sorted output

From: Christof Petig <christof(at)petig-baender(dot)de>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Philip Warner <pjw(at)rhyme(dot)com(dot)au>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump: PATCH for Sorted output
Date: 2001-12-11 11:23:58
Message-ID: 3C15ECCE.E208FB27@petig-baender.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christof Petig wrote:

> Christopher Kings-Lynne wrote:
>
> > > But making a patch to pg_dump is a matter of (say) up to 4 hours.
> > > I'll do it since you seem to like it and nobody started doing it so far.
> >
> > Well, I'm in no way a major developer, so even if I do like it, I don't know
> > what the chances are of it making its way into the tree.
>
> If I stop using C++ comments '//', the chance might grew better ;-) [I
> apologize again]
>
> Since Philip also likes it ...
> I would say it's a good feature to have.

Here's the patch. It's not as efficient as it might be (if dumpTable_order_by had
indinfo around) but it works. I'm not clear about quoting when using sorted output
in 'COPY' style. So if anybody has good test cases around (tables with strange
characters), please check it.

Also I don't know whether the sorting behaviour is sensible when it comes to
inheritance. Can someone using inheritance please check it.

If you like the patch I'll provide documentation patches.

-----

This patch implements:
-T alias '--sort' which sorts by primary key / the columns in output order

Yours
Christof

Attachment Content-Type Size
dump_sort_V4.gz application/x-gzip 2.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2001-12-11 12:13:36 Re: Explicit configuration file
Previous Message Peter Eisentraut 2001-12-11 11:22:48 Re: ODBC functions in gram.y