Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A74F69F9CE3; Wed, 3 Jan 2007 14:08:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 39762-06; Wed, 3 Jan 2007 14:08:04 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from pd2mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by postgresql.org (Postfix) with ESMTP id E12CB9F931E; Wed, 3 Jan 2007 14:08:05 -0400 (AST) Received: from pd4mr5so.prod.shaw.ca (pd4mr5so-qfe3.prod.shaw.ca [10.0.141.50]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0JBB002N71194470@l-daemon>; Wed, 03 Jan 2007 11:07:57 -0700 (MST) Received: from pn2ml10so.prod.shaw.ca ([10.0.121.80]) by pd4mr5so.prod.shaw.ca (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTP id <0JBB00KV71189580@pd4mr5so.prod.shaw.ca>; Wed, 03 Jan 2007 11:07:57 -0700 (MST) Received: from owner ([24.70.144.142]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with SMTP id <0JBB00JCE116TZP1@l-daemon>; Wed, 03 Jan 2007 11:07:54 -0700 (MST) Date: Wed, 03 Jan 2007 10:07:50 -0800 From: Bob Pawley Subject: Re: Backup Restore To: Richard Huxton Cc: Dave Page , Shoaib Mir , Postgresql Message-id: <009d01c72f62$14e98fe0$8e904618@owner> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Mailer: Microsoft Outlook Express 6.00.2900.3028 Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=response Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: <000e01c72ab1$ceec0220$8e904618@owner> <45941B3B.8060708@postgresql.org> <002601c72ab8$97bc5640$8e904618@owner> <459423C1.70009@postgresql.org> <006001c72aec$2789cfe0$8e904618@owner> <4594CD6D.1050104@postgresql.org> <001001c72b7a$ba2e7600$8e904618@owner> <4595650F.7000504@postgresql.org> <001901c72b7f$5a5e29f0$8e904618@owner> <459A2D47.4020206@archonet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/92 X-Sequence-Number: 106632 Looking through PGAdmin where would I find the spatial references that the errror message references? Bob ----- Original Message ----- From: "Richard Huxton" To: "Bob Pawley" Cc: "Dave Page" ; "Shoaib Mir" ; "Postgresql" Sent: Tuesday, January 02, 2007 2:00 AM Subject: Re: [GENERAL] Backup Restore > Bob Pawley wrote: >> Following is the error message on pg_restore:- >> >> "pg_restore: ERROR: duplicate key violates unique constraint >> "spatial_ref_sys_pkey" >> CONTEXT: COPY spatial_ref_sys, line 1: "2000 EPSG 2000 PROJCS["Anguilla >> 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Angui..." >> pg_restore: [archiver (db)] error returned by PQendcopy: ERROR: >> duplicate key violates unique constraint "spatial_ref_sys_pkey" >> CONTEXT: COPY spatial_ref_sys, line 1: "2000 EPSG 2000 PROJCS["Anguilla >> 1957 / British West Indies Grid",GEOGCS["Anguilla 1957",DATUM["Angui..." >> pg_restore: *** aborted because of error >> >> Process returned exit code 1." >> >> The GIS feature was removed from the PostgreSQL application before the >> project dump. > > Not sure what you mean by that - you removed all GIS related types and > functions from the source database? > >> Anyone have any thoughts on how to get around this?? > > Remove the constraint if you no longer have that requirement. It looks > like you have a primary-key defined on spatial_ref_sys and want to remove > it. See the SQL Reference section of the manuals for how to use ALTER > TABLE to drop primary keys and other constraints. > > I'm curious as to how this can happen though. Are the definitions of table > spatial_ref_sys the same in the source and target database? > > -- > Richard Huxton > Archonet Ltd > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster >