[Mapserver-users] How to delete a GIST Index in gc_ok

christian.schuster at rsag.ch christian.schuster at rsag.ch
Thu Jan 30 07:59:09 PST 2003


This is a multipart message in MIME format.
--=_alternative 0057D01AC1256CBE_=
Content-Type: text/plain; charset="US-ASCII"

Hi Mark,

Unfortunately, I did not use the DropGeometryColumn function. I am also 
not aware of the syntax of this function because I could not find any 
information about this.
You wrote me to add the GeometryColumn again. This is just the part which 
is causing an error. So I am not able to add again a GeometryColumn wiht 
the previous table name.

Can you send me the synthay for the function DropGeometryColumn? Then I 
would try to delete it even if the table does not exist anmore.

Thanks

Christian Schuster

Rudolf Schuster AG
Postfach 277
CH - 3000 Bern 11

http://www.rsag.ch
++41 31 348 05 30



"Mark Cave-Ayland" <mark.cave-ayland at webbased.co.uk> 
30.01.2003 16:22

To
<christian.schuster at rsag.ch>
cc

Subject
RE: [Mapserver-users] How to delete a GIST Index in gc_ok








Hi Christian,

 

Did you use the DropGeometryColumnto remove the old geometry column from 
the geo table? Otherwise you need to add the old geometry column back into 
your table, then use the function DropGeometryColumnto properly remove it. 
Once this is done, you should be able to carry on without any duplicate 
key problems.

 

 

Hope this helps,

 

Mark.

 

---

Mark Cave-Ayland
Webbased Ltd.
Tamar Science Park
Derriford
Plymouth
PL6 8BX
England

Tel: +44 (0)1752 764445
Fax: +44 (0)1752 764446


This email and any attachments are confidential to the intended recipient 
and may also be privileged. If you are not the intended recipient please 
delete it from your system and notify the sender. You should not copy it 
or use it for any purpose nor disclose or distribute its contents to any 
other person.

-----Original Message-----
From: christian.schuster at rsag.ch[mailto:christian.schuster at rsag.ch] 
Sent:30 January 2003 13:56
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] How to delete a GIST Index in gc_ok

 


Hi list, 

I had a table 'geo' with a geometry column of type point and also a GIST 
index. Then I deleted this table as well as the index belonging to it and 
create it again. So far okay. But as I wanted to add the geometry column I 
received the following error message. To work around this problem I 
renamed the table in to geo2 and then I could add the geometry column. 

I am working on Win2000 with Cygwin, PostgreSQL-7.3.1-1 and PostGIS-0.7.3 

Does anyone know how to delete the key in index gc_ok? 

Thanks for your help. 


myGISdb=# create table geo (ID int4, NAME varchar(20)); 
CREATE TABLE 
myGISdb=# select addgeometrycolumn('myGISdb', 'geo', 'geom', -1, 'POINT', 
2); 
ERROR:  Cannot insert a duplicate key into unique index gc_ok 
WARNING:  Error occurred while executing PL/pgSQL function 
addgeometrycolumn 
WARNING:  Error occurred while executing PL/pgSQL function 
addgeometrycolumn 
WARNING:  line 39 at execute statement 
WARNING:  line 39 at execute statement 
ERROR:  Cannot insert a duplicate key into unique index gc_ok 

Christian Schuster

Rudolf Schuster AG
Postfach 277
CH - 3000 Bern 11

http://www.rsag.ch
++41 31 348 05 30

--=_alternative 0057D01AC1256CBE_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Mark,</font>
<br>
<br><font size=2 face="sans-serif">Unfortunately, I did not use the DropGeometryColumn
function. I am also not aware of the syntax of this function because I
could not find any information about this.</font>
<br><font size=2 face="sans-serif">You wrote me to add the GeometryColumn
again. This is just the part which is causing an error. So I am not able
to add again a GeometryColumn wiht the previous table name.</font>
<br>
<br><font size=2 face="sans-serif">Can you send me the synthay for the
function DropGeometryColumn? Then I would try to delete it even if the
table does not exist anmore.</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br><font size=2 face="sans-serif"><br>
Christian Schuster<br>
<br>
Rudolf Schuster AG<br>
Postfach 277<br>
CH - 3000 Bern 11<br>
<br>
http://www.rsag.ch<br>
++41 31 348 05 30</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>"Mark Cave-Ayland"
<mark.cave-ayland at webbased.co.uk></b> </font>
<p><font size=1 face="sans-serif">30.01.2003 16:22</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif"><christian.schuster at rsag.ch></font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">RE: [Mapserver-users] How
to delete a GIST Index in gc_ok</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=2>Hi Christian,</font>
<br>
<br><font size=2> </font>
<br>
<br><font size=2>Did you use the DropGeometryColumnto remove the old geometry
column from the geo table? Otherwise you need to add the old geometry column
back into your table, then use the function DropGeometryColumnto properly
remove it. Once this is done, you should be able to carry on without any
duplicate key problems.</font>
<br>
<br><font size=2> </font>
<br>
<br><font size=2> </font>
<br>
<br><font size=2>Hope this helps,</font>
<br>
<br><font size=2> </font>
<br>
<br><font size=2>Mark.</font>
<br>
<br><font size=2> </font>
<br>
<br><font size=2>---</font>
<br>
<br><font size=2>Mark Cave-Ayland</font>
<br><font size=3>Webbased Ltd.</font>
<br><font size=3>Tamar Science Park</font>
<br><font size=3>Derriford</font>
<br><font size=3>Plymouth</font>
<br><font size=3>PL6 8BX</font>
<br><font size=3>England</font>
<br>
<br><font size=3>Tel: +44 (0)1752 764445</font>
<br><font size=3>Fax: +44 (0)1752 764446</font>
<br>
<br>
<br><font size=3>This email and any attachments are confidential to the
intended recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender. You
should not copy it or use it for any purpose nor disclose or distribute
its contents to any other person.</font>
<br>
<br><font size=2>-----Original Message-----</font>
<br><font size=2><b>From:</b> christian.schuster at rsag.ch</font><font size=3>[mailto:</font><font size=2>christian.schuster at rsag.ch]
</font>
<br><font size=2><b>Sent</b></font><font size=3><b>:</b></font><font size=2>30
Jan</font><font size=3>uary 2003 13:56</font>
<br><font size=3><b>To:</b> </font><font size=2>mapserver-users at lists.gis.umn.edu</font>
<br><font size=3><b>Subject:</b> [Mapserver-users] How to delete a GIST
Index in gc_ok</font>
<br>
<br><font size=3> </font>
<br>
<br>
<br><font size=2>Hi list,</font><font size=3> </font>
<br>
<br><font size=2>I had a table <b>'geo'</b> with a geometry column of type
<b>point</b> and also a GIST index. Then I deleted this table as well as
the index belonging to it and create it again. So far okay. But as I wanted
to add the geometry column I received the following error message. To work
around this problem I renamed the table in to geo2 and then I could add
the geometry column.</font><font size=3> </font>
<br>
<br><font size=2>I am working on Win2000 with Cygwin, PostgreSQL-7.3.1-1
and PostGIS-0.7.3</font><font size=3> </font>
<br>
<br><font size=2>Does anyone know how to delete the key in index gc_ok?</font><font size=3>
</font>
<br>
<br><font size=2>Thanks for your help.</font><font size=3> </font>
<br>
<br>
<br><font size=2><b>myGISdb=# create table geo (ID int4, NAME varchar(20));</b></font><font size=3>
</font>
<br><font size=2><b>CREATE TABLE</b></font><font size=3> </font>
<br><font size=2><b>myGISdb=# select addgeometrycolumn('myGISdb', 'geo',
'geom', -1, 'POINT', 2);</b></font><font size=3> </font>
<br><font size=2><b>ERROR:  Cannot insert a duplicate key into unique
index gc_ok</b></font><font size=3> </font>
<br><font size=2><b>WARNING:  Error occurred while executing PL/pgSQL
function addgeometrycolumn</b></font><font size=3> </font>
<br><font size=2><b>WARNING:  Error occurred while executing PL/pgSQL
function addgeometrycolumn</b></font><font size=3> </font>
<br><font size=2><b>WARNING:  line 39 at execute statement</b></font><font size=3>
</font>
<br><font size=2><b>WARNING:  line 39 at execute statement</b></font><font size=3>
</font>
<br><font size=2><b>ERROR:  Cannot insert a duplicate key into unique
index gc_ok</b></font><font size=3> </font>
<br>
<br><font size=2>Christian Schuster</font>
<br>
<br><font size=2>Rudolf Schuster AG</font>
<br><font size=2>Postfach 277</font>
<br><font size=2>CH - 3000 Bern 11</font>
<br>
<br><font size=2>http://www.rsag.ch</font>
<br><font size=2>++41 31 348 05 30</font>
<br>
--=_alternative 0057D01AC1256CBE_=--



More information about the MapServer-users mailing list