[postgis-users] Trouble upgrading to 2.0.1

Bborie Park bkpark at ucdavis.edu
Tue Jul 24 11:11:55 PDT 2012


The spatial_ref_sys table has no sequence by default.

-bborie

On 07/24/2012 11:03 AM, Hays Barrett wrote:
> Sorry for the late reply.
> We tried installing postgis both the old and new way before running
> postgis_restore.pl and both gave the same results.
> I think one of the developers is up to  some funny business. should
> spatial_ref_sys_srid_seq even exist? I think this was created by us.
> spatial_ref_sys shouldn't even have a sequence right?
> 
> On Fri, Jul 20, 2012 at 11:30 AM, Sandro Santilli <strk at keybit.net> wrote:
> 
>> On Fri, Jul 20, 2012 at 11:13:35AM -0600, Hays Barrett wrote:
>>> Hello all. I am trying to upgrade to postgis-2.0.1.
>>>
>>> I dumped my db with :
>>> pg_dump -Fc -b -v -f "/opt/dump/dump.sql" postgis
>>>
>>> When I run "./postgis_restore.pl "/opt/dump/dump.sql" | psql -a
>> postgis2" I
>>> get 2 errors.
>>>
>>> ALTER SEQUENCE spatial_ref_sys_srid_seq OWNED BY spatial_ref_sys.srid;
>>> ERROR:  sequence must have same owner as table it is linked to
>>> SELECT pg_catalog.setval('spatial_ref_sys_srid_seq', 1, false);
>>>
>>>
>>> ALTER TABLE spatial_ref_sys ADD PRIMARY KEY(srid);
>>> ERROR:  could not create unique index "spatial_ref_sys_pkey"
>>> DETAIL:  Key (srid)=(4279) is duplicated.
>>
>> This is really unexpected, I'm surprised it happens.
>> Did you install the spatial_ref_sys.sql in "postgis2" database
>> prior to sending the postgis_restore.pl output ?
>> Did you get any notice on stderr from postgis_restore.pl ?
>>
>> --strk;
>>
>>   ,------o-.
>>   |   __/  |    Delivering high quality PostGIS 2.1
>>   |  / 2.1 |    http://strk.keybit.net - http://vizzuality.com
>>   `-o------'
>>
>>
> 
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list