Re: dump order by

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: dump order by
Дата
Msg-id 50D5F3AF.7080606@gmail.com
обсуждение исходный текст
Ответ на dump order by  (jo <jose.soares@sferacarta.com>)
Список pgsql-general
On 12/22/2012 09:29 AM, jo wrote:
> Hi all,
> I would like to know if it is possible to dump a table ordered by its
> primary key.
> Take a look at the this test table...
> \d test
>                          Table "public.test"
> Column    |  Type   |     Modifiers
> -----------+---------+---------------------------------------------------
> id        | integer | not null name      | text    |
> id_father | integer |
> Indexes:
>     "test_pkey" PRIMARY KEY, btree (id)
> Foreign-key constraints:
>     "test_id_father_fkey" FOREIGN KEY (id_father) REFERENCES test(id)
>

Why not use the COPY command directly?:

http://www.postgresql.org/docs/9.2/interactive/sql-copy.html

FYI:

"COPY with a file name instructs the PostgreSQL server to directly read
from or write to a file. The file must be accessible to the server and
the name must be specified from the viewpoint of the server. When STDIN
or STDOUT is specified, data is transmitted via the connection between
the client and the server.
"

If you want to work from the client you can use \copy in psql.

--
Adrian Klaver
adrian.klaver@gmail.com


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

Предыдущее
От: salah jubeh
Дата:
Сообщение: Re: dump order by
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: rule / trigger definition