Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1739 closed defect (worksforme)

Problem with soft extension upgrade

Reported by: otto Owned by: strk
Priority: medium Milestone: PostGIS 2.0.0
Component: build Version: 2.0.x
Keywords: Cc:

Description

I have 2.0.0b2 installed as an extension. Shouldn't I be able to do a soft upgrade to rc1?

When I run the following:

ALTER EXTENSION postgis UPDATE TO "2.0.0rc1";

I get:

ERROR:  cannot drop cast from geometry to geometry because extension postgis requires it
HINT:  You can drop extension postgis instead.

********** Error **********

ERROR: cannot drop cast from geometry to geometry because extension postgis requires it
SQL state: 2BP01
Hint: You can drop extension postgis instead.

I'm running pgsql 9.1.2 on OSX 10.6

Change History (4)

comment:1 by robe, 12 years ago

Otto — hmm that is weird why there would be a cast from geometry to geometry.

Is your version 2.0.0beta2 ? I assume your b2 is short-hand.

I'll give upgrade another try but didn't have any issue gong from beta4 to rc1. I'll install beta2 and try to upgrade on my windows box.

comment:2 by otto, 12 years ago

Yes.

SELECT name, default_version, installed_version FROM pg_available_extensions WHERE name = 'postgis'
"postgis";"2.0.0rc1";"2.0.0beta2"

But I might have broken something in my 1.5 to 2.0.0beta2 upgrade. If it's working for you I'm sure it's my fault somehow and I'll do a hard upgrade instead.

comment:3 by robe, 12 years ago

Resolution: worksforme
Status: newclosed

Okay I just installed beta2 and then installed rc1 and then upgraded my beta2 to rc1 and didn't run into any problems.

The only time I've seen an error similar to what you have there is when I tried to move the schema of my postgis extension to another schema. Though I just tried that now and magically it worked — it let me move the postgis extension to my topology schema and all the functions and types moved and views (except for 2 functions) now show up in topology schema yeah. Have to investigate why those didn't move (they might some how be left out of extension or maybe they are from beta2 that our drop script didn't remove. I'll put a separate ticket in for that one.

I'm running PostgreSQL 9.1.2 as well but on windows.

You might want to first try first by backing up your database and then restoring.

Restore I think always ends up picking up the latest version.

comment:4 by otto, 12 years ago

Thanks for looking at this and I'm sorry for the extra work. I'm sure a restore will fix this for me.

Note: See TracTickets for help on using tickets.