X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4CA21474E4F for ; Thu, 13 Feb 2003 11:35:17 -0500 (EST) Received: from priv-edtnes27.telusplanet.net (outbound04.telus.net [199.185.220.223]) by postgresql.org (Postfix) with ESMTP id 0AFA2474E42 for ; Thu, 13 Feb 2003 11:35:15 -0500 (EST) Received: from xpro ([142.173.125.142]) by priv-edtnes27.telusplanet.net (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20030213163519.ROAM26720.priv-edtnes27.telusplanet.net@xpro> for ; Thu, 13 Feb 2003 09:35:19 -0700 From: "piuschan" To: Subject: pg_restore fails when restoring a database view Date: Thu, 13 Feb 2003 08:35:14 -0800 Message-ID: <000001c2d37d$e2742370$2d01a8c0@xpro> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C2D33A.D450E370" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/297 X-Sequence-Number: 11695 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C2D33A.D450E370 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0001_01C2D33A.D450E370 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 for= mat 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: ERR= OR:  CREATE TABLE: attribute "?column?" duplicated

pg_restore: *** aborted because of error

 

Any idea?

 

Thanks,

 

Pius

------=_NextPart_000_0001_01C2D33A.D450E370--