Re: copy a database

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: dsuela(at)xsto(dot)info
Cc: Christopher Browne <cbbrowne(at)acm(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: copy a database
Date: 2004-08-25 15:25:02
Message-ID: 1093447501.29385.6.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2004-08-25 at 15:08, David Suela Fernández wrote:

> The problem is that pg_dump always give me the next error:
>
> pg_dump: SQL command failed
> pg_dump: Error message from server: ERROR: relation "pg_user" does not exist
> pg_dump: The command was: SELECT (SELECT usename FROM pg_user WHERE usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding, datpath FROM pg_database WHERE datname = 'ez3'

Maybe recreating pg_user in the database will help. It is a global
table, so if you have other databases where pg_user exists, copy the row
from pg_class in that database to pg_class in the corrupted database.

--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"But the day of the Lord will come as a thief in the
night. The heavens shall pass away with a great noise,
and the elements shall melt with fervent heat, and the
earth and the works that are therein shall be burned
up." II Peter 3:10

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2004-08-25 15:39:53 Re: Unsupported 3rd-party solutions (Was: Few questions
Previous Message Liu, Mingyi 2004-08-25 15:14:36 any solution for full text search in Postgres for partial words