Re: copy a database - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: copy a database
Date
Msg-id 20040825160958.GA18252@dcc.uchile.cl
Whole thread Raw
In response to Re: copy a database  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: copy a database
Re: copy a database
List pgsql-general
On Wed, Aug 25, 2004 at 04:25:02PM +0100, Oliver Elphick wrote:
> 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.

No, pg_user is a view on pg_shadow ...

SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb,
pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd,
pg_shadow.valuntil, pg_shadow.useconfig FROM pg_shadow;

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Y una voz del caos me habló y me dijo
"Sonríe y sé feliz, podría ser peor".
Y sonreí. Y fui feliz.
Y fue peor.


pgsql-general by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Re: Gentoo for production DB server?
Next
From: Alvaro Herrera
Date:
Subject: Re: any solution for full text search in Postgres for partial words