Re: Dumping partial database content - Mailing list pgsql-admin

From Christopher Browne
Subject Re: Dumping partial database content
Date
Msg-id m34qoq6x1a.fsf@wolfe.cbbrowne.com
Whole thread Raw
In response to Re: Dumping partial database content  ("Bender, Cheryl" <cbender@mriresearch.org>)
List pgsql-admin
Martha Stewart called it a Good Thing when cbender@mriresearch.org ("Bender, Cheryl") wrote:
> Just wondering--is it possible to dump on a temporary table?

The temp table is only visible inside the context of the transaction
under which it was created.

A pg_dump session will create an independent transaction context,
where the table won't be visible, alas.

So you can't use pg_dump to dump the data out.

You may, however, use COPY to dump it out yourself.

  select * into temp table foo from bar;
  copy foo to '/tmp/foo_contents.txt';
--
If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
http://www.ntlug.org/~cbbrowne/postgresql.html
Rules of the Evil Overlord #50. "My main computers will have their own
special  operating system  that will  be completely  incompatible with
standard IBM and Macintosh powerbooks."
<http://www.eviloverlord.com/>

pgsql-admin by date:

Previous
From: teknet@poczta.onet.pl
Date:
Subject: Re: SERIAL type not autoincremented
Next
From: Radu-Adrian Popescu
Date:
Subject: Re: SERIAL type not autoincremented