pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Browne <cbbrowne@acm.org>
To: pgsql-admin@postgresql.org
Subject: Re: Dumping  partial database content
Date: Fri, 02 Jul 2004 15:15:13 -0400
Message-ID: <m34qoq6x1a.fsf@wolfe.cbbrowne.com> (raw)
References: <D5DB5D0D27171247AFEC9648EE98752F032125C9@KCEX2KV1.mri-kc.int>

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/;



view thread (6+ messages)  latest in thread

Message-ID: <m34qoq6x1a.fsf@wolfe.cbbrowne.com>
Permalink:  ../m34qoq6x1a.fsf@wolfe.cbbrowne.com/
Also on:    postgresql.org/message-id/m34qoq6x1a.fsf@wolfe.cbbrowne.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: Dumping  partial database content
  In-Reply-To: <m34qoq6x1a.fsf@wolfe.cbbrowne.com>
  References: <D5DB5D0D27171247AFEC9648EE98752F032125C9@KCEX2KV1.mri-kc.int> <m34qoq6x1a.fsf@wolfe.cbbrowne.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox