From: | Guy Fraser <guy(at)incentre(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: copy a database |
Date: | 2004-08-26 14:51:08 |
Message-ID: | 412DF8DC.1020500@incentre.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Have you tried to use "copy" to export the data from each table?
As a last resort you could try this, since you said you can still
select data from the tables.
Make a list of tables then :
sed -e "/^.*/copy & TO '&.sql';/" table.list | psql database
This should create a file for each table ending with ".sql".
Then re-create the table on the new DB and use "copy" to
import the data from the files.
David Suela Fernández wrote:
>El mié, 25-08-2004 a las 20:54, Tom Lane escribió:
>
>
>>David Suela =?ISO-8859-1?Q?Fern=E1ndez?= <dsuela(at)xsto(dot)info> writes:
>>
>>
>>>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
>>>
>>>
>>Have you tried re-creating that view?
>>
>>CREATE VIEW pg_catalog.pg_user AS
>> SELECT
>> usename,
>> usesysid,
>> usecreatedb,
>> usesuper,
>> usecatupd,
>> '********'::text as passwd,
>> valuntil,
>> useconfig
>> FROM pg_shadow;
>>
>> regards, tom lane
>>
>>
>
>It return:
>ERROR: permission denied to create "pg_catalog.pg_user"
>DETAIL: System catalog modifications are currently disallowed.
>
>How can i change this permissions?
>
>
--
Guy Fraser
From | Date | Subject | |
---|---|---|---|
Next Message | Leonardo Francalanci | 2004-08-26 14:55:48 | R: space taken by a row & compressed data |
Previous Message | Tom Lane | 2004-08-26 14:42:23 | Re: stone-age maintenance procedures ;-) |