pg_restore fails when restoring a database view

From: "Pius Chan" <chanpius(at)hotmail(dot)com>
To: sfpug(at)postgresql(dot)org
Subject: pg_restore fails when restoring a database view
Date: 2003-02-13 17:17:41
Message-ID: F183UnHAaaz7EjQxzmW000000b6@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Hi,

I have created a database view by :

CREATE VIEW V_EDUCATION_LEVEL ( id, description ) AS
SELECT 1, 'College or above'
UNION ALL
SELECT 2, 'Secondary';

I pg_dump(ed) the database by specifying a tar format and tried to
pg_restore to a destination database. However, I encountered the following
error:

pg_restore: creating VIEW v_education_level
pg_restore: [archiver (db)] could not execute query: ERROR: CREATE TABLE:
attribute "?column?" duplicated
pg_restore: *** aborted because of error

Any idea?

Thanks,

Pius

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail

Responses

Browse sfpug by date

  From Date Subject
Next Message Josh Berkus 2003-02-13 18:18:43 Re: pg_restore fails when restoring a database view
Previous Message Josh Berkus 2003-02-13 01:03:55 Re: Transaction-based insert w/PHP?