Re: pg_dump ORDER BY - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: pg_dump ORDER BY
Date
Msg-id 3A303478.9162BFC1@sayegh.de
Whole thread Raw
In response to Re: pg_dump ORDER BY  ("Joel Burton" <jburton@scw.org>)
List pgsql-novice
Joel Burton wrote:

> SELECT * INTO foo_temp FROM foo ORDER BY primarykeycolumn;
>
> TRUNCATE foo;
>
> INSERT INTO foo SELECT * FROM foo_temp;
>
> This preserves triggers, ref.int., etc., and will put things physically
> in the right order. (The TRUNCATE won't call any delete triggers you
> have, but the INSERT will, so if you log/handle inserts in a special
> way, this might fill up your log/take some time.) )

That sounds interesting, but as i only need the dump sorted (not the
real data,
the order will be destroyed the next time we update) it would be enough
to
do the SELECT INTO.

cu
--
 Nabil Sayegh

pgsql-novice by date:

Previous
From: Aarmel
Date:
Subject: Grant all
Next
From: GH
Date:
Subject: Re: Grant all