Обсуждение: Pg_dump

Поиск
Список
Период
Сортировка

Pg_dump

От
Gourish Singbal
Дата:
1) I want to take a pg_dump of only few tables

/usr/local/pgsql/bin/pg_dump -t [table_name] database_name > file.out

allows me only to take dump of single table. Is there a way to take
dump of more than one specific tables.

2) Does pg_dump allow me to take dump of a table so that only some
records are included in the dump (Some thing like specifying a QUERY
in the pg_dump)


--
Best,
Gourish Singbal

Re: Pg_dump

От
Bruno Wolff III
Дата:
On Sun, Dec 26, 2004 at 15:39:48 +0530,
  Gourish Singbal <gourish@gmail.com> wrote:
> 1) I want to take a pg_dump of only few tables
>
> /usr/local/pgsql/bin/pg_dump -t [table_name] database_name > file.out
>
> allows me only to take dump of single table. Is there a way to take
> dump of more than one specific tables.

I think this is a new feature for 8.0.

> 2) Does pg_dump allow me to take dump of a table so that only some
> records are included in the dump (Some thing like specifying a QUERY
> in the pg_dump)

I suspect the best way to do this is to create a new table, select the desired
records into that table and then dump it.

Re: Pg_dump

От
Tom Lane
Дата:
Bruno Wolff III <bruno@wolff.to> writes:
>   Gourish Singbal <gourish@gmail.com> wrote:
>> allows me only to take dump of single table. Is there a way to take
>> dump of more than one specific tables.

> I think this is a new feature for 8.0.

No, it's not in 8.0 either; you still need a separate pg_dump run for each
table.

            regards, tom lane

Re: Pg_dump

От
"Spiegelberg, Greg"
Дата:
Benig able to exclude tables from dump's would be useful as well.

Greg

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Sunday, December 26, 2004 6:34 PM
To: Bruno Wolff III
Cc: Gourish Singbal; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Pg_dump


Bruno Wolff III <bruno@wolff.to> writes:
>   Gourish Singbal <gourish@gmail.com> wrote:
>> allows me only to take dump of single table. Is there a way to take
>> dump of more than one specific tables.

> I think this is a new feature for 8.0.

No, it's not in 8.0 either; you still need a separate pg_dump run for each
table.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: Pg_dump

От
Bruno Wolff III
Дата:
On Mon, Dec 27, 2004 at 09:27:53 -0500,
  "Spiegelberg, Greg" <gspiegelberg@cranel.com> wrote:
> Benig able to exclude tables from dump's would be useful as well.

There was some discussion about doing this kind of thing about 6 months
ago (shortly before beta). I appearantly misremembered the end result
of the discussion, but you should be able to find it in the archives.

>
> Greg
>
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Sunday, December 26, 2004 6:34 PM
> To: Bruno Wolff III
> Cc: Gourish Singbal; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Pg_dump
>
>
> Bruno Wolff III <bruno@wolff.to> writes:
> >   Gourish Singbal <gourish@gmail.com> wrote:
> >> allows me only to take dump of single table. Is there a way to take
> >> dump of more than one specific tables.
>
> > I think this is a new feature for 8.0.
>
> No, it's not in 8.0 either; you still need a separate pg_dump run for each
> table.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html

Re: Pg_dump

От
Gourish Singbal
Дата:
Thanks

i will try to find the answer in the archives,

Also will having a saperate schema for a set of tables help me in
taking pg_dump only of specific tables. is it possible to create
schema for already existing  postgresql database tables ?.

Also how do i know is any tables need recovery...
like in oracle we come to know from a view called as v$recovery_log.
is some thing like is this possible in postgres.

Best
Gourish

On Sun, 26 Dec 2004 18:33:37 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruno Wolff III <bruno@wolff.to> writes:
> >   Gourish Singbal <gourish@gmail.com> wrote:
> >> allows me only to take dump of single table. Is there a way to take
> >> dump of more than one specific tables.
>
> > I think this is a new feature for 8.0.
>
> No, it's not in 8.0 either; you still need a separate pg_dump run for each
> table.
>
>                        regards, tom lane
>


--
Best,
Gourish Singbal