Re: SOLVED - pg_restore question

Поиск
Список
Период
Сортировка
От Johnson, Shaunn
Тема Re: SOLVED - pg_restore question
Дата
Msg-id 73309C2FDD95D11192E60008C7B1D5BB0452E3A6@snt452.corp.bcbsm.com
обсуждение исходный текст
Список pgsql-general

--Thanks.  I remembered that I did something like
this a bit ago, but for some reason thought that
pg_restore was the way to go.  Yeah, I finally
used psql -d <database> -f ./<pg_dump file>.  Everything
else is embedded in the SQL script.

--Looks like it created all of the things I
needed.  I don't recall the docs saying
anything about when using pg_dump, use the -Ct
option or you won't be able to use pg_restore ... or
maybe I missed that part.  At least, it doesn't
appear to be very obvious as to how to recreate the table
without destroying the database using pg_restore.

--Anyhow, thanks!

-X

-----Original Message-----
From: Andrew Sullivan [mailto:andrew@libertyrms.info]
Sent: Monday, May 06, 2002 3:05 PM
To: Johnson, Shaunn
Subject: Re: [GENERAL] pg_restore question

On Mon, May 06, 2002 at 12:48:34PM -0400, Johnson, Shaunn wrote:
> Running Postgres 7.1.3 on RedHat Linux 7.2.
>
> I'm looking for examples of using pg_restore.

Don't bother.  You created an ASCII file.  The only reason to use
pg_restore is if you've created a non-ASCII dump.

> pg_dump -u -t table_name database | /bin/gzip > table_name.gz

gunzip -c table_name.gz | psql database

Note that you didn't tell pg_dump to clean the database, so it won't drop the table before creating. So make sure you've done that

yourself.

A
--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110

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

Предыдущее
От: Steve Lane
Дата:
Сообщение: Re: Subject: bool / vacuum full bug followup part 2
Следующее
От: "frank_lupo@email.it"
Дата:
Сообщение: count problem