Re: Copying table to another database.

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Wim <wdh(at)belbone(dot)be>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Copying table to another database.
Date: 2002-09-17 09:53:17
Message-ID: Pine.LNX.4.21.0209171040460.599-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2002-09-17 10:00:57 Re: Open Source Database article
Previous Message Richard Huxton 2002-09-17 09:51:05 Re: connecting inside pl/pgsql