Re: pg_dump: PATCH for Sorted output

Поиск
Список
Период
Сортировка
От Christof Petig
Тема Re: pg_dump: PATCH for Sorted output
Дата
Msg-id 3C15ECCE.E208FB27@petig-baender.de
обсуждение исходный текст
Ответ на Re: pg_dump: Sorted output, referential integrity  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список 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


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kovacs Zoltan
Дата:
Сообщение: Re: Beta4 or RC1 ... ?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: ODBC functions in gram.y