Re: Copying table to another database. - Mailing list pgsql-general

From Nigel J. Andrews
Subject Re: Copying table to another database.
Date
Msg-id Pine.LNX.4.21.0209171040460.599-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Copying table to another database.  (Wim <wdh@belbone.be>)
List pgsql-general
On Tue, 17 Sep 2002, Wim wrote:

> Anyone knows how to copy a table to another database?


Use the the COPY command:

Name
COPY  --  copy data between files and tables

Synopsis

COPY [ BINARY ] table [ WITH OIDS ]
 FROM { 'filename' | stdin }
 [ [USING] DELIMITERS 'delimiter' ]
 [ WITH NULL AS 'null string' ]

COPY [ BINARY ] table [ WITH OIDS ]
 TO { 'filename' | stdout }
 [ [USING] DELIMITERS 'delimiter' ]
 [ WITH NULL AS 'null string' ]


Or, bearing in mind your problem,

 pg_dump -t <tablename> ...


For your real problem, it sounds like it's the system tables causing you
problems. You say you tried REINDEX, that was REINDEX DATABASE <dbname> FORCE
presumably.

It is somewhat worrying that the same problem has reoccured. You checked your
hard disk but what about memory?

pg_dumpall fails but what about just pg_dump on the individual DBs?

Is it a production system? If it continues to cause problems what about
considering bringing someone in to investigate?


--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants



pgsql-general by date:

Previous
From: Tycho Fruru
Date:
Subject: Re: Copying table to another database.
Next
From: Richard Huxton
Date:
Subject: Re: connecting inside pl/pgsql